out-of-bounds? ( PARTICLE -- ? )


Vocabulary
bubble-chamber

Inputs
PARTICLEan object


Outputs
?an object


Definition


:: 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|| ;