Checking the distance Between 2 points?

BlitzMax Forums/BlitzMax Programming/Checking the distance Between 2 points?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Not a bug. The ^ operator calls a function called bbFloatPow(). It takes floats as parameters and uses floating point math and returns floats. There is no Int version. The 4^2 doesn't return 15, but it returns something like 15.99999 and since I am storing it into an Int in my example, it gets truncated to 15.
There are more accurate ways to calculate ^, even with floats, but it seems Mark has chosen speed over accuracy, which in my opinion is stupid since even with the faster implementation, X*X is still considerably faster than X^2.