Handbook
Glossary
if-ray-sphere ( hit ray sphere quot -- hit )
Vocabulary
benchmark
.
raytracer
Inputs
hit
an
object
ray
an
object
sphere
an
object
quot
an
object
Outputs
hit
an
object
Definition
USING:
accessors
kernel
math
;
IN:
benchmark.raytracer
:
if-ray-sphere
( hit ray sphere quot -- hit )
[
[
]
[
swap
ray-sphere
nip
]
[
2drop
lambda>>
]
3tri
[
drop
]
[
<
]
2bi
]
dip
[
3drop
]
if
;
inline