mirror of https://github.com/mosra/magnum.git
Browse Source
While this makes 32-bit float cross product precision basically equivalent to a 64-bit calculation casted back to 32-bit, it stays with the speed halfway between the straightforward 32- and 64-bit implementation. However only on platforms that actually have a FMA instruction. For example on Emscripten the code is TEN TIMES slower than the baseline implementation, which is not an acceptable tradeoff -- there simply using doubles to calculate the result is faster. And enabling the more precise variant only on some platforms doesn't seem like a good idea for portability. Stashing this aside until I'm clearer what to do with this.catastrophic-cross
4 changed files with 53 additions and 4 deletions
Loading…
Reference in new issue