if-ray-sphere ( hit ray sphere quot: ( hit ray sphere l -- hit ) -- hit )


Vocabulary
benchmark.raytracer-simd

Inputs
hitan object
rayan object
spherean object
quota quotation with stack effect ( hit ray sphere l -- hit )


Outputs
hitan object


Definition


: 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