| 297 | } |
| 298 | |
| 299 | void xMat3x3RotC(xMat3x3* m, F32 _x, F32 _y, F32 _z, F32 t) |
| 300 | { |
| 301 | F32 sin; |
| 302 | F32 cos; |
| 303 | F32 c; |
| 304 | |
| 305 | if (t == 0.0f) |
| 306 | { |
| 307 | xMat3x3Identity(m); |
| 308 | return; |
| 309 | } |
| 310 | |
| 311 | cos = icos(t); |
| 312 | sin = isin(t); |
| 313 | |
| 314 | c = 1.0f - cos; |
| 315 | |
| 316 | m->right.x = (c * _x * _x) + cos; |
| 317 | m->right.y = (sin * _z) + (c * _x * _y); |
| 318 | m->right.z = (-sin * _y) + (c * _z * _x); |
| 319 | |
| 320 | m->up.x = (-sin * _z) + (c * _x * _y); |
| 321 | m->up.y = (c * _y * _y) + cos; |
| 322 | m->up.z = (sin * _x) + (c * _y * _z); |
| 323 | |
| 324 | m->at.x = (sin * _y) + (c * _z * _x); |
| 325 | m->at.y = (-sin * _x) + (c * _y * _z); |
| 326 | m->at.z = (c * _z * _z) + cos; |
| 327 | |
| 328 | m->flags = 0; |
| 329 | } |
| 330 | |
| 331 | void xMat3x3RotX(xMat3x3* m, F32 t) |
| 332 | { |
no test coverage detected