Add v2 to v1 and store the result in dest . @param v1 the first addend @param v2 the second addend @param dest will hold the result
(Vec4 v1, Vec4 v2, Vec4 dest)
| 278 | * @param v2 the second addend |
| 279 | * @param dest will hold the result |
| 280 | */ |
| 281 | public static Vec4 add(Vec4 v1, Vec4 v2, Vec4 dest) { |
| 282 | if (dest == null) dest = new Vec4(); |
| 283 | dest.x = v1.x + v2.x; |
| 284 | dest.y = v1.y + v2.y; |
| 285 | dest.z = v1.z + v2.z; |
| 286 | dest.w = v1.w + v2.w; |
| 287 | return dest; |
| 288 | } |
| 289 | |
| 290 | /** |