/** * Returns the maximum absolute value of the coordinates of the control points * of the given bezier curve. * * @param ps an order 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]]` * * @doc */ function maxAbsCoordinate(ps: number[][]) { let m = Number.NEGATIVE_INFINITY; for (let i=0; i m) { m = absX; } if (absY > m) { m = absY; } } return m; } export { maxAbsCoordinate }