ray

Usage

ray <coord> <move-x> <move-y>

Return value

Array of coordinates of all spaces within a single "ray" of movement beyond <coord>. Specifically, it includes each square reached by taking successive steps from <coord> moving <move-x> squares horizontally and <move-y> vertically.

Positive or negative values of <move-x> indicate right or left, respectively. Positive or negative values of <move-y> indicate up or down, respectively.

Example

See also

rays

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.