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