Closed PiezPiedPy closed 7 years ago
The function is meant to overflow. It is designed that way. That is part of the algorithm.
Overflowing is not bad in itself. Rather is just something to be aware of, and even to exploit like in this case.
I suggest you turn off overflow exceptions in your compiler instead. The flag is called 'Check for arithmetic overflow/underflow' in SharpDevelop. Probably VisualStudio has a similar one.
Fix to Lib.FastRandomFloat() function to stop it throwing an overflow exception, (noticed it while debugging). Downside is it computes slower but its safer.