diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-10-24 15:25:50 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-10-24 15:25:50 +1000 |
commit | 0ea2f5463730a0067f4c146dd7f33398fcac8229 (patch) | |
tree | bbaf9abec0b4c5395ffafd21b95bc554436f5956 /src/gmisc | |
parent | e6f17baf6133fb83c5c72f7b173cf50c9c275224 (diff) | |
download | uGFX-0ea2f5463730a0067f4c146dd7f33398fcac8229.tar.gz uGFX-0ea2f5463730a0067f4c146dd7f33398fcac8229.tar.bz2 uGFX-0ea2f5463730a0067f4c146dd7f33398fcac8229.zip |
Slight improvement to the precision of the GMISC invsqrt() function.
Diffstat (limited to 'src/gmisc')
-rw-r--r-- | src/gmisc/trig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gmisc/trig.c b/src/gmisc/trig.c index cd35bdc0..2485da85 100644 --- a/src/gmisc/trig.c +++ b/src/gmisc/trig.c @@ -167,7 +167,7 @@ #endif // evil floating point bit level hacking - i = 0x5F3759DF - (i >> 1); + i = 0x5F375A86 - (i >> 1); // The quake code used 0x5F3759DF but this is better. // Convert back to a float (no binary format conversion) #if GDISP_INVSQRT_MIXED_ENDIAN |