Linearly interpolate between two points.
If either point is null, this function interpolates from Point.origin.
Source
static Point lerp(Point a, Point b, double t) {
if (a == null && b == null)
return null;
if (a == null)
return b * t;
if (b == null)
return a * (1.0 - t);
return new Point(lerpDouble(a.x, b.x, t), lerpDouble(a.y, b.y, t));
}