Multiply v by the scalar value and store the result in dest . @param v the vector to multiply @param scalar the scalar to multiply the given vector by @param dest will hold the result
(Vec3 v, double scalar, Vec3 dest)
| 299 | * @param dest will hold the result |
| 300 | */ |
| 301 | public static Vec3 mul(Vec3 v, double scalar, Vec3 dest) { |
| 302 | if (dest == null) dest = new Vec3(); |
| 303 | dest.x = v.x * scalar; |
| 304 | dest.y = v.y * scalar; |
| 305 | dest.z = v.z * scalar; |
| 306 | return dest; |
| 307 | } |
| 308 | |
| 309 | /** |
| 310 | * Calculate the cross product of a and b and store the result in <code>dest</code>. |
no test coverage detected