at method

Vector3 at(
  1. double t,
  2. Vector3 result
)

Computes a position on the line segment according to the given t value and stores the result in the given 3D vector. The t value has usually a range of 0, 1 where 0 means start position and 1 the end position.

Implementation

/// [0, 1] where 0 means start position and 1 the end position.
Vector3 at(double t, Vector3 result ) {
	return delta( result ).multiplyScalar( t ).add( from );
}