Handbook
Glossary
triangular-random* ( low high rnd -- n )
Vocabulary
random
Inputs
low
an
object
high
an
object
rnd
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
random
::
triangular-random*
( low high rnd -- n )
low high
+
2
/f
:>
mode mode low
-
high low
-
/
:>
c! rnd
random-unit*
:>
u! high low u c
>
[
1.0 u
-
u! 1.0 c
-
c!
swap
]
when
[
-
u c
*
sqrt
*
]
keep
+
;