CurveUtils

Curve helpers. A curve is a list of points, each {x, y, inX, inY, outX, outY}, which holds the point and its two handles. YAt reads the curve's y at an x, Sample(points, samples) gives samples + 1 evenly spaced values from the first point to the last (samples a whole number from 1 to 16383), Straight makes a straight curve from (x0, y0) to (x1, y1), 0, 0 to 1, 1 when left out.

Functions

NameArgumentsReturns
CurveUtils.YAt(points: {{number}}, x: number)number
CurveUtils.Sample(points: {{number}}, samples: number){number}
CurveUtils.Straight(x0: number?, y0: number?, x1: number?, y1: number?){{number}}