Skip to content

Commit

Permalink
Move rintf to ZunMath.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KSSBrawl committed Dec 31, 2024
1 parent 0be5c25 commit 56d6b58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/AnmManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,16 +703,6 @@ void AnmManager::TranslateRotation(VertexTex1Xyzrwh *param_1, f32 x, f32 y, f32
return;
}

f32 __inline rintf(f32 float_in)
{
__asm {
fld float_in
frndint
fstp float_in
}
return float_in;
}

#pragma var_order(spriteXCenter, spriteYCenter, yOffset, xOffset, zSine, z, zCosine)
ZunResult AnmManager::Draw(AnmVm *vm)
{
Expand Down
10 changes: 10 additions & 0 deletions src/ZunMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,13 @@ f32 __inline invertf(f32 x)
{
return 1.f / x;
}

f32 __inline rintf(f32 float_in)
{
__asm {
fld float_in
frndint
fstp float_in
}
return float_in;
}

0 comments on commit 56d6b58

Please sign in to comment.