Skip to content

Commit

Permalink
dunno
Browse files Browse the repository at this point in the history
  • Loading branch information
spiricom committed Oct 29, 2024
1 parent e8ee875 commit eb18ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leaf/Inc/leaf-math.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ inline float InvSqrt(float x)
//union unholy_t unholy;
//unholy.i = x;
//unholy.i = 0x5f3759df - (unholy.i>>1); // gives initial guess y0

i = 0x5f3759df - (i>>1); // gives initial guess y0
x = *(Lfloat*)&i; // convert bits back to float
// x = unholy.f;

Expand Down

0 comments on commit eb18ce2

Please sign in to comment.