Handbook
Glossary
value ( p q t -- value )
Vocabulary
colors
.
hsl
.
private
Inputs
p
an
object
q
an
object
t
an
object
Outputs
value
an
object
Definition
USING:
combinators
kernel
math
;
IN:
colors.hsl.private
:
value
( p q t -- value )
dup
0
<
[
1.0
+
]
when
dup
1
>
[
1.0
-
]
when
{
{
[
dup
1/6
<
]
[
[
over
-
]
dip
*
6
*
+
]
}
{
[
dup
1/2
<
]
[
drop
nip
]
}
{
[
dup
2/3
<
]
[
[
over
-
]
dip
2/3
swap
-
*
6
*
+
]
}
[
2drop
]
}
cond
;