Normalize this quaternion. @return this
()
| 117 | * |
| 118 | * @return this |
| 119 | */ |
| 120 | public Quat normalize() { |
| 121 | double norm = Math.sqrt(x * x + y * y + z * z + w * w); |
| 122 | x /= norm; |
| 123 | y /= norm; |
| 124 | z /= norm; |
| 125 | w /= norm; |
| 126 | return this; |
| 127 | } |
| 128 | |
| 129 | /** |