Skip to content

editor / areValidRadii

Function: areValidRadii() ​

areValidRadii(radii, count): boolean

Defined in: model/are-valid-radii.ts:15

Whether the requested corner radii of a shape can enter the model: one per vertex, each an integer ≥ 0 (ADR-0029, ADR-0003).

A radius larger than the shape is valid: it is clamped (ADR-0007).

Parameters ​

radii ​

readonly number[]

requested radius of each vertex, in contour order

count ​

number

number of vertices of the shape

Returns ​

boolean

true when there is one valid radius per vertex

Kind ​

domain

See ​

docs/domain/shapes.md#_2-corner-radius