Subtract b from a and store the result in dest . @param a the vector to subtract from @param b the vector to subtract @param dest will hold the result
(Vec2 a, Vec2 b, Vec2 dest)
| 224 | * @param dest will hold the result |
| 225 | */ |
| 226 | public static Vec2 sub(Vec2 a, Vec2 b, Vec2 dest) { |
| 227 | if (dest == null) dest = new Vec2(); |
| 228 | dest.x = a.x - b.x; |
| 229 | dest.y = a.y - b.y; |
| 230 | return dest; |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * Return the dot product of a vector and another. |
no outgoing calls
no test coverage detected