Skip to content

Commit

Permalink
Prescale Clq matched
Browse files Browse the repository at this point in the history
  • Loading branch information
LordBozo committed Aug 26, 2024
1 parent 76546e5 commit a29f3e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ GRandInRange__Fff = 0x1EAAE0; // type:func
GRandGaussian = 0x1EAB48; // type:func
FFloatsNear__Ffff = 0x1EAC68; // type:func
CSolveQuadratic = 0x1EACA0; // type:func
PrescaleClq = 0x1EAD30; // type:func
PrescaleClq__FP3CLQffT0 = 0x1EAD30; // type:func
CalculateSinCos__FfPfT1 = 0x1EAD88; // type:func
GTrunc = 0x1EAE78; // type:func
GTrunc1 = 0x1EAF28; // type:func
Expand Down
8 changes: 7 additions & 1 deletion src/P2/util.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <util.h>
#include <vec.h>
#include <sce/rand.h>
#include <sce/math.h>

Expand Down Expand Up @@ -103,7 +104,12 @@ int FFloatsNear(float g1,float g2,float gEpsilon)

INCLUDE_ASM(const s32, "P2/util", CSolveQuadratic);

INCLUDE_ASM(const s32, "P2/util", PrescaleClq);
void PrescaleClq(CLQ *pclqSrc, float ru, float du, CLQ *pclqDst)
{
pclqDst->w = pclqSrc->w * ru * ru;
pclqDst->v = (pclqSrc->w + pclqSrc->w) * ru * du + pclqSrc->v * ru;
pclqDst->u = pclqSrc->w * du * du + pclqSrc->v * du + pclqSrc->u;
}

INCLUDE_ASM(const s32, "P2/util", CalculateSinCos__FfPfT1);

Expand Down

0 comments on commit a29f3e0

Please sign in to comment.