lerp method

Vector3 lerp(
  1. Vector3 to,
  2. double weight
)

Implementation

Vector3 lerp(Vector3 to, double weight) {
  return Vector3(
    x + (to.x - x) * weight,
    y + (to.y - y) * weight,
    z + (to.z - z) * weight,
  );
}