It's something easy to realize once playing around with the functions a while, but galaxy does NOT follow the standard for c-style languages of truncating when converting floats to integers (round towards 0). Instead, it floor's (rounds to negative infinity).
It's something easy to realize once playing around with the functions a while, but galaxy does NOT follow the standard for c-style languages of truncating when converting floats to integers (round towards 0). Instead, it floor's (rounds to negative infinity).
I don't really understand what you mean there, could you give some examples or C vs Galaxy?
@vjeux: Go
@xhatix: Go
It' galaxy, right?
so, then for C-like it must be that?
<<code>>
FixedToInt(-1.4)0
<</code>>
@o3210: Go
no - it's just that it's not using the absolute value of a number - instead it is narrowing straight to (-1+IntegerMax)
C++ :
<<code c++>>
(int) -1.4f-1
<</code>>
Truncation
Floor Function
This is a significant difference when doing any sort of rounding.