MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xQuatFromAxisAngle

Function xQuatFromAxisAngle

src/SB/Core/x/xMath3.cpp:602–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602void xQuatFromAxisAngle(xQuat* q, const xVec3* a, F32 t)
603{
604 F32 t_2;
605
606 if (t == 0.0f)
607 {
608 xQuatCopy(q, &g_IQ);
609 }
610 else
611 {
612 t_2 = isin(t * 0.5f);
613 q->s = icos((t * 0.5f));
614 xVec3SMul(&q->v, a, t_2);
615 }
616}
617
618void xQuatToMat(const xQuat* q, xMat3x3* m)
619{

Callers

nothing calls this directly

Calls 4

xQuatCopyFunction · 0.85
isinFunction · 0.85
icosFunction · 0.85
xVec3SMulFunction · 0.85

Tested by

no test coverage detected