Skip to main content

evaluate-1st-derivative

function evaluate1stDerivative(ps: number[][]): (t: number) => number[]
function evaluate1stDerivative(ps: number[][], t: number): number[]

Defined in local-properties-at-t/evaluate-1st-derivative/double/evaluate-1st-derivative.ts:19

Returns the [x,y] value of the once differentiated (with respect to t) bezier curve's power basis when evaluated at t.

  • uses double precision calculations internally
  • curried: if t is omitted a function of t is returned instead (the power basis conversion is then only done once which is much faster if the derivative is to be evaluated at many t values for the same curve)

Parameters:​

NameTypeDescription
psnumber[][]a linear, quadratic or cubic bezier, e.g. [[0,0],[1,1],[2,1],[2,0]]
t?numberthe t parameter (may be omitted, see above)