Skip to main content

point_along

Function point_along 

Source
pub fn point_along(
    from: Point,
    out_tangent: Vec2,
    in_tangent: Vec2,
    to: Point,
    amount: f64,
) -> Point
Expand description

The point amount of the way along the curve from from to to, its control points from + out_tangent and to + in_tangent, measured along its length; all in a space scaled so lengths are as they are on screen.

An amount outside 0..=1 (an overshooting timing curve) continues past the end in a straight line along the curve’s end tangent, or along the chord where that tangent is zero.