Calculate the cross product of a and b and store the result in dest . @param a the first vec3 @param v the second vec3 @param dest will hold the result @return dest
(Vec3 a, Vec3 v, Vec3 dest)
| 315 | * @return dest |
| 316 | */ |
| 317 | public static Vec3 cross(Vec3 a, Vec3 v, Vec3 dest) { |
| 318 | if (dest == null) dest = new Vec3(); |
| 319 | dest.set(a.y * v.z - a.z * v.y, a.z * v.x - a.x * v.z, a.x * v.y - a.y * v.x); |
| 320 | return dest; |
| 321 | } |
| 322 | |
| 323 | /** |
| 324 | * Return the dot product of a vector and another. |