| 349 | } |
| 350 | |
| 351 | f32 stQtNormalize(Quaternion *dst, const Quaternion *q) |
| 352 | { |
| 353 | float length = (q->x * q->x + q->y * q->y + q->z * q->z + q->w * q->w); |
| 354 | if (length != 0.0f) |
| 355 | { |
| 356 | float mag = 1.0f / std::sqrtf(length); |
| 357 | |
| 358 | dst->x = q->x * mag; |
| 359 | dst->y = q->y * mag; |
| 360 | dst->z = q->z * mag; |
| 361 | dst->w = q->w * mag; |
| 362 | } |
| 363 | return length; |
| 364 | } |
| 365 | |
| 366 | int stMakePlaneParam(stPlaneParam &planeParam, TVec3f &vec1, const TVec3f &vec2) |
| 367 | { |
no test coverage detected