static Vec2D scaleAndAdd(Vec2D result, Vec2D a, Vec2D b, double scale) { result.x = a.x + b.x * scale; result.y = a.y + b.y * scale; return result; }