(out, a)
| 69967 | return out; |
| 69968 | } |
| 69969 | function normalize(out, a) { |
| 69970 | var x = a[0], y = a[1]; |
| 69971 | var len1 = x * x + y * y; |
| 69972 | if (len1 > 0) //TODO: evaluate use of glm_invsqrt here? |
| 69973 | len1 = 1 / Math.sqrt(len1); |
| 69974 | out[0] = a[0] * len1; |
| 69975 | out[1] = a[1] * len1; |
| 69976 | return out; |
| 69977 | } |
| 69978 | function dot(a, b) { |
| 69979 | return a[0] * b[0] + a[1] * b[1]; |
| 69980 | } |
no test coverage detected