lerp method

Point3 lerp(
  1. Point3 p2,
  2. num coeff
)

Performs a linear interpolation between two points.

Implementation

Point3 lerp(Point3 p2, num coeff) => Point3(
    this.x * coeff + p2.x * (1 - coeff),
    this.y * coeff + p2.y * (1 - coeff),
    this.z * coeff + p2.z * (1 - coeff));