(float-round) ( x round-quot -- y )


Vocabulary
math.functions

Inputs and outputs
xan object
round-quotan object
yan object


Definition


: (float-round) ( x round-quot -- y )
[ dup 1 mod [ - ] keep dup swapd abs 0.5 ] [ call ] bi*
[ swap 0.0 < -1.0 1.0 ? + ] [ nip ] if ; inline