Normalize the quaternion
| 236 | |
| 237 | // Normalize the quaternion |
| 238 | RP3D_FORCE_INLINE void Quaternion::normalize() { |
| 239 | |
| 240 | decimal l = length(); |
| 241 | |
| 242 | // Check if the length is not equal to zero |
| 243 | assert (l > MACHINE_EPSILON); |
| 244 | |
| 245 | x /= l; |
| 246 | y /= l; |
| 247 | z /= l; |
| 248 | w /= l; |
| 249 | } |
| 250 | |
| 251 | // Inverse the quaternion |
| 252 | RP3D_FORCE_INLINE void Quaternion::inverse() { |
nothing calls this directly
no outgoing calls
no test coverage detected