lerp method

void lerp(
  1. Vec3 vector,
  2. double t,
  3. Vec3 target
)

Do a linear interpolation between two vectors @param t A number between 0 and 1. 0 will make this function return u, and 1 will make it return v. Numbers in between will generate a vector in between them.

Implementation

void lerp(Vec3 vector,double t, Vec3 target) {

  target.x = x + (vector.x - x) * t;
  target.y = y + (vector.y - y) * t;
  target.z = z + (vector.z - z) * t;
}