lerpVector3 function

Vector3 lerpVector3(
  1. Vector3 a,
  2. Vector3 b,
  3. double t
)

Interpolates between two Vector3.

Implementation

Vector3 lerpVector3(Vector3 a, Vector3 b, double t) {
  return Vector3(
    a.x + (b.x - a.x) * t,
    a.y + (b.y - a.y) * t,
    a.z + (b.z - a.z) * t,
  );
}