Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspAnInRgn

DspAnInRgn

Checks if an AN is within a region bounded by two ANs.

Syntax

pAnInRgn(AN, One, Two)

AN:

The animation-point number.

One, Two:

One - the AN at a corner of the region; two - the AN at the opposite corner of the region.

Return Value

1 if the AN is within the region, or 0 (zero) if it is not.

Example

DspGetMouse(X,Y);
DspAnMove(250,X,Y);
IF DspAnInRgn(250,20,30) THEN
Prompt("Mouse in region bounded by AN20 and AN30");
ELSE
Prompt("Mouse not in region");
END

See Also

Display Functions