point3.lerp
The point at a normalised parameter along the segment from a to b.
Usage
Point3.lerp(a: Point3, b: Point3, t: number): Point3Parameters
aPoint3The point at t = 0. Required. In model.
bPoint3The point at t = 1. Required. In model.
tnumberPosition along the segment: 0 gives
a, 1 givesb; values outside [0, 1] extrapolate along the line. Required. In normalised.
Returns
The point a + (b − a) · t; NaN when a coordinate is NaN or two infinities cancel.
Use instead
line.pointAt: the segment is already aLine
Example
Point3.lerp(Point3.origin, Point3.of(10, 0, 0), 0.25) // → { x: 2.5, y: 0, z: 0 }