Handbook
Glossary
out-of-bounds? ( PARTICLE -- ? )
Vocabulary
bubble-chamber
Inputs
PARTICLE
an
object
Outputs
?
an
object
Definition
USING:
accessors
combinators.short-circuit
math
sequences
;
IN:
bubble-chamber
::
out-of-bounds?
( PARTICLE -- ? )
PARTICLE
pos>>
first
:>
X PARTICLE
pos>>
second
:>
Y
PARTICLE
bubble-chamber>>
size>>
first
:>
WIDTH PARTICLE
bubble-chamber>>
size>>
second
:>
HEIGHT WIDTH
neg
:>
LEFT
WIDTH 2
*
:>
RIGHT HEIGHT
neg
:>
BOTTOM HEIGHT 2
*
:>
TOP
{
[
X LEFT
<
]
[
X RIGHT
>
]
[
Y BOTTOM
<
]
[
Y TOP
>
]
}
0||
;