| 492 | } |
| 493 | |
| 494 | void vm_SinCosToMatrix(matrix *m, float sinp, float cosp, float sinb, float cosb, float sinh, float cosh) { |
| 495 | float sbsh, cbch, cbsh, sbch; |
| 496 | |
| 497 | sbsh = (sinb * sinh); |
| 498 | cbch = (cosb * cosh); |
| 499 | cbsh = (cosb * sinh); |
| 500 | sbch = (sinb * cosh); |
| 501 | |
| 502 | m->rvec.x = cbch + (sinp * sbsh); // m1 |
| 503 | m->uvec.z = sbsh + (sinp * cbch); // m8 |
| 504 | |
| 505 | m->uvec.x = (sinp * cbsh) - sbch; // m2 |
| 506 | m->rvec.z = (sinp * sbch) - cbsh; // m7 |
| 507 | |
| 508 | m->fvec.x = (sinh * cosp); // m3 |
| 509 | m->rvec.y = (sinb * cosp); // m4 |
| 510 | m->uvec.y = (cosb * cosp); // m5 |
| 511 | m->fvec.z = (cosh * cosp); // m9 |
| 512 | |
| 513 | m->fvec.y = -sinp; // m6 |
| 514 | } |
| 515 | |
| 516 | void vm_AnglesToMatrix(matrix *m, angle p, angle h, angle b) { |
| 517 | float sinp, cosp, sinb, cosb, sinh, cosh; |
no outgoing calls
no test coverage detected