Comparing Numbers

Blitz3D Forums/Blitz3D Beginners Area/Comparing Numbers

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.

Yes, use a tolerance ... You see that there is a tiny difference between the two.

sv#=0
ms#=0.44
tolerance# = 0.000001
While Not KeyDown(1)
	Print sv+" - "+ms

	If Abs( sv-ms) < tolerance
		Print( sv-ms)
		Stop
	Else
		sv=sv+.01
	EndIf
	Delay 100
Wend