Handbook
Glossary
(ratio-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
:
(ratio-round)
( x round-quot -- y )
[
>fraction
[
/mod
dup
swapd
abs
2
*
]
keep
]
[
call
]
bi*
[
swap
0
<
-1 1
?
+
]
[
nip
]
if
;
inline