The built-in functions include round, floor, ceil, and trunc. Trunc rounds towards zero. For floats, the behavior of trunc is equivalent to the following:
float func trunc(float x)
if x >= 0
return floor(x)
else
return ceil(x)
endif
endfunc
There is no equivalent function with < instead of >. In mathematics, I haven't even found a name for this. The best name that I could come up is "elong", a shortened version of elongate, as truncate is short for truncate.
Any comments?
The built-in functions include round, floor, ceil, and trunc. Trunc rounds towards zero. For floats, the behavior of trunc is equivalent to the following:
````
float func trunc(float x)
if x >= 0
return floor(x)
else
return ceil(x)
endif
endfunc
````
There is no equivalent function with < instead of >. In mathematics, I haven't even found a name for this. The best name that I could come up is "elong", a shortened version of elongate, as truncate is short for truncate.
Any comments?