Functions
Const closestPointCubic
- closestPointCubic(p: ReadonlyVec, a: ReadonlyVec, b: ReadonlyVec, c: ReadonlyVec, d: ReadonlyVec, out?: Vec, res?: undefined | number, iter?: undefined | number, eps?: undefined | number): Vec
Parameters
p: ReadonlyVec
a: ReadonlyVec
b: ReadonlyVec
c: ReadonlyVec
d: ReadonlyVec
Default value out: Vec = []
Optional res: undefined | number
Optional iter: undefined | number
Optional eps: undefined | number
Returns Vec
Performs recursive search for closest point to
p
on cubic curve defined by control pointsa
,b
,c
,d
. Theres
andrecur
params are used to control the recursion behavior. Ifeps
is given, the search is terminated as soon as a point with a shorter squared distance thaneps
is found.{@link @thi.ng/math#minError}