Linearly interpolate a and b using the given interpolation factor t and store the result in dest . If t is 0.0 then the result is this . If the interpolation factor is 1.0 then the result is o
(Vec2 a, Vec2 b, double t, Vec2 dest)
| 299 | * @return this |
| 300 | */ |
| 301 | public static Vec2 lerp(Vec2 a, Vec2 b, double t, Vec2 dest) { |
| 302 | if (dest == null) dest = new Vec2(); |
| 303 | dest.x = (1.0 - t) * a.x + t * b.x; |
| 304 | dest.y = (1.0 - t) * a.y + t * b.y; |
| 305 | return dest; |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Return the dot product of a vector and another. |
no outgoing calls
no test coverage detected