lerp method

Vector4D lerp(
  1. Vector4D o,
  2. double amount
)

Implementation

Vector4D lerp(Vector4D o, double amount) => .vec4(
  x + amount*(o.x - x),
  y + amount*(o.y - y),
  z + amount*(o.z - z),
  w + amount*(o.w - w),
);