summaryrefslogtreecommitdiff
path: root/src/m/m_mtx.cpp
blob: 712d612c04dc372f1bb1178d809f572e8d90fee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "c/c_math.h"
#include "m/m_math.h"
#include "nw4r/math.h"

void mMtx_c::toRot(mAng3_c &out) const {
    f32 t1 = 0.0f;
    f32 t0 = m[0][2] + m[2][2];
    if (t0 > 0.0f) {
        t1 = t0 * nw4r::math::FrSqrt(t0);
    }
    s16 anglex = cM::atan2s(-m[1][2], t1);
}