[REBOL] Re: ANN: Planetary defense
From: carl:cybercraft at: 9-Sep-2002 1:18
On 08-Sep-02, Andrew Martin wrote:
> This one works better:
> ; Needed until very latest versions of Rebol are released.
> if not value? 'as-pair [
> as-pair: func [
> "Combine X and Y values into a pair."
> x [number!] y [number!]
> to-pair reduce [to-integer x to-integer y]
Thanks Andrew, though there was a fixed version of the game put out.
I'd seen as-pair mentioned before, but I couldn't quite remember what
it did. A useful function I stumbled across recently was within? ...
>> ? within?
WITHIN? point offset size
Return TRUE if the point is within the rectangle bounds.
WITHIN? is a function value.
point -- XY position (Type: pair)
offset -- Offset of area (Type: pair)
size -- Size of area (Type: pair)
Don't know how well it's known though, so I thought I'd mention it.