rotate-neg-90
function rotateNeg90(ps: number[][]): number[][]
Defined in transformation/affine/rotate-neg-90.ts:14
Returns the given bezier curve rotated anti-clockwise about the origin by exactly -90 degrees (i.e. clockwise by 90 degrees).
This is an exact special case of rotate that avoids the floating point error introduced by evaluating sin/cos of a rounded Math.PI/2. The rotation reduces to (x,y) -> (y,-x) which is exact.
0
Parameters:
| Name | Type | Description |
|---|---|---|
ps | number[][] | an order 0,1,2 or 3 bezier curve given as an ordered array of its control point coordinates, e.g. [[0,0], [1,1], [2,1], [2,0]] |