Handbook
Glossary
(float-round) ( x round-quot -- y )
Vocabulary
math
.
functions
Inputs
x
an
object
round-quot
an
object
Outputs
y
an
object
Definition
USING:
kernel
math
;
IN:
math.functions
:
(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