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
13
libs/citro3d/source/maths/quat_crossfvec3.c
Normal file
13
libs/citro3d/source/maths/quat_crossfvec3.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <c3d/maths.h>
|
||||
|
||||
C3D_FVec Quat_CrossFVec3(C3D_FQuat q, C3D_FVec v)
|
||||
{
|
||||
C3D_FVec qv = FVec3_New(q.i, q.j, q.k);
|
||||
C3D_FVec uv = FVec3_Cross(qv, v);
|
||||
C3D_FVec uuv = FVec3_Cross(qv, uv);
|
||||
|
||||
uv = FVec3_Scale(uv, 2.0f * q.r);
|
||||
uuv = FVec3_Scale(uuv, 2.0f);
|
||||
|
||||
return FVec3_Add(v, FVec3_Add(uv, uuv));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue