aninest root / Vec2 / bezier
bezier()
ts
function bezier(
v1,
v2,
p1,
p2,
time): Vec2
Performs a bezier interpolation between two vectors by a time value.
Parameters
• v1: Vec2
The start vector.
• v2: Vec2
The end vector.
• p1: Vec2
Control point 1.
• p2: Vec2
Control point 2.
• time: number
The time value to interpolate by (should be between 0 and 1).
Returns
A new vector.