Distance between two points in 3d.

Blitz3D Forums/Blitz3D Programming/Distance between two points in 3d.

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.

far:
Blitz's integers ARE longs. They can go up to approximately +-2 billion.

Blitz's floats can go really really high. I can't really say how high for sure though. But the problem is that the higher or lower you go with a float, the less precise the value is.

In other words, if you have a huge float, like 10 billion, and you add 0.1 to it, it might still be 10 billion, and not 10 billion + 0.1.

With floats what you need to know is the number of digits of precision they have, but I don't know what it is in Blitz. But it's good enough for most realistic sizes of level. I use a scale of 1 unit = 1 meter, and I never have levels that are more than 2km or so wide, and I've never had a problem, but if you're modelling space, then you might have a problem if you don't scale everything down.