is-quad-really-line
function isQuadReallyLine(ps: number[][]): boolean
Defined in global-properties/classification/is-quad-really-line.ts:25
Returns true
if the given quadratic bezier curve is really a linear curve
(or a point), i.e. if all control points collinear and it can be converted
to an order 1 bezier curve (a line) such that the
same (x,y)
point is returned for the same t
value, false
otherwise.
- the required condition is met if:
x0 + x2 = 2*x1
andy0 + y2 = 2*y1
- exact: not susceptible to floating point round-off
Note!
Green circles are draggable!
Note!
Green circles are draggable!
Parameters:
Name | Type | Description |
---|---|---|
ps | number[][] | a quadratic bezier curve given as an array of its control points, e.g. [[1,2],[5,6],[7,8]] |