Strange INT behavior

Blitz3D Forums/Blitz3D Beginners Area/Strange INT behavior

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.

I can't think of a way without using if statements.

So use If statements.

The exact behavior of Int, Floor and Ceil is in the docs.
The only confusing thing is that Int actually means round, not the traditional 'chop'.

Calculating chop is certainly slower than Int. But this is unavoidable. Intel CPUs do not have a built-in command for this. So even if Blitz changed the behavior of Int to chop it would still have to be done by calculation.