Ftrunc()
Ftrunc() rounds to the next whole number, not larger than the whole part of the number.
Syntax: result = Ftrunc( value as single )
Example:
dim a as single a=123.5 a = Ftrunc(a) ' output: 123.0 a=-123.5 a = Ftrunc(a) ' output: -123.0
en:ftrunc
Ftrunc() rounds to the next whole number, not larger than the whole part of the number.
Syntax: result = Ftrunc( value as single )
Example:
dim a as single a=123.5 a = Ftrunc(a) ' output: 123.0 a=-123.5 a = Ftrunc(a) ' output: -123.0