The function TRINT gives the integer part of a floating point number, it differs from INT for negative numbers only: INT always returns the next lowest integer, this is the same as the integer part for positive numbers; however below zero INT always returns one less than TRINT. For example:
will return -4 and:
will return -3.
The fact that:
x = TRINT(x) + FRACT(x)
can be exploited to substitute one of the two functions by the other, for example:
100 DEFine FuNction MYTRINT(x) 110 RETurn x - FRACT(x) 120 END DEFine MYTRINT