Transpose multiply two rotations: qT * r
(q, r B2Rot)
| 633 | |
| 634 | /// Transpose multiply two rotations: qT * r |
| 635 | func B2RotMulT(q, r B2Rot) B2Rot { |
| 636 | return B2Rot{ |
| 637 | S: q.C*r.S - q.S*r.C, |
| 638 | C: q.C*r.C + q.S*r.S, |
| 639 | } |
| 640 | } |
| 641 | |
| 642 | /// Rotate a vector |
| 643 | func B2RotVec2Mul(q B2Rot, v B2Vec2) B2Vec2 { |