sm64
sm64 copied to clipboard
Add hardware accelerated floating point square root
Related to #39, #37 Can be disabled with a linker option if it causes issues. I removed the fdiv and fmul implementations again because they weren't that much faster than gcc's own in my tests, but there was a large difference for sqrtf, and I was able to match it the default implementation bit-for-bit just by adding rounding.
I apparently also replace a float->u16 function that uses float adds, sorry forgot about this. There's also some changes to the makefile in this.
The define in math.h is probably also unnecessary, I'll remove it.
Don't merge this until I get rid of this issue, one of the changes (not the sqrtf) causes a frame to be misrendered at the start of the game. I may open a new PR for just the square root function once it has been retested and added to blocksds.