Skip to main content

get-bounds

function getBounds(ps: number[][]): object

Defined in global-properties/bounds/get-bounds.ts:15

Returns an axis-aligned bounding box together with the t values where the bounds on the bezier are reached.

Note!
Green circles are draggable!
0

Parameters:

NameTypeDescription
psnumber[][]an order 1,2 or 3 bezier curve given as an array of its control points, e.g. [[0,0], [1,1], [2,1], [2,0]]

Returns: object

NameType
tsnumber[][]
boxnumber[][]