You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen below, the result of Integer() function depends on the SetFloatDelta() setting :
FUNCTION Start() AS VOID
SetFloatDelta(0.0)
? "Float delta 0:"
? Integer(0.1) // 0, OK
? Integer(0.001) // 0, OK
SetFloatDelta(0.01)
? "Float delta 0.01:"
? Integer(0.1) // 0, OK
? Integer(0.001) // 1, wrong, 0 in VO
Problem is in this code of Integer() function:
FUNCTION Integer(nValue AS USUAL) AS USUAL
...
IF nValue > 0.0 // this comparison depends on SetFloatDelta()
result := Floor(nValue)
ELSE
result := Ceil(nValue)
ENDIF
This can be fixed by casting the number to a REAL8 for the comparison, but we need to search for other similar occasions in the runtime.
The text was updated successfully, but these errors were encountered:
As seen below, the result of Integer() function depends on the SetFloatDelta() setting :
Problem is in this code of Integer() function:
This can be fixed by casting the number to a REAL8 for the comparison, but we need to search for other similar occasions in the runtime.
The text was updated successfully, but these errors were encountered: