Adds v2 from v1 and store the result in dest . @param v1 the vector to add to @param v2 the vector to add @param dest will hold the result (automatically allocated if null) @return dest
(Vec3 v1, Vec3 v2, Vec3 dest)
| 265 | * @return dest |
| 266 | */ |
| 267 | public static Vec3 add(Vec3 v1, Vec3 v2, Vec3 dest) { |
| 268 | if (dest == null) dest = new Vec3(); |
| 269 | dest.x = v1.x + v2.x; |
| 270 | dest.y = v1.y + v2.y; |
| 271 | dest.z = v1.z + v2.z; |
| 272 | return dest; |
| 273 | } |
| 274 | |
| 275 | /** |
| 276 | * returns x*w+y in dest |
no outgoing calls
no test coverage detected