mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 08:49:30 +00:00
Updated all the libs, added citro3d, added ctr.swkbd (WIP, untested)
This commit is contained in:
parent
68a44645f7
commit
49c87e5526
97 changed files with 7341 additions and 944 deletions
12
libs/citro3d/source/maths/quat_rotatey.c
Normal file
12
libs/citro3d/source/maths/quat_rotatey.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include <c3d/maths.h>
|
||||
|
||||
C3D_FQuat Quat_RotateY(C3D_FQuat q, float r, bool bRightSide)
|
||||
{
|
||||
float c = cosf(r/2.0f);
|
||||
float s = sinf(r/2.0f);
|
||||
|
||||
if (bRightSide)
|
||||
return Quat_New(q.i*c + q.k*s, q.r*s + q.j*c, q.k*c - q.i*s, q.r*c - q.j*s);
|
||||
else
|
||||
return Quat_New(q.i*c - q.k*s, q.r*s + q.j*c, q.k*c + q.i*s, q.r*c - q.j*s);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue