floor function

Nirran

Vault Senior Citizen
Modder
is this accurate?in regards to a bug posted in another thread im wondering if is a more accurate function,like trunc maybe?
 
That's why we added a "floor2".
> int sfall_func1("floor2", int/float value)
- works just like vanilla floor function, but returns correct integers for negative values
- vanilla floor function works exactly the same as ceil for negative values, much like trunc in C/C++
 
Last edited:
nice,tyvm

edit : tried it,it still reports 1 xp point under what is actually gained
 
Last edited:
tried floor2(var) and compiler spouts not known,tried sfall_func1("floor2", var) and same behavior as floor(var),modders pack installed

Nirran

edit : issue solved by adding .00001 to the number to be floored(Credit to Novarain)
 
Last edited:
Back
Top