Bounds.contains

From MiniScript Wiki
Revision as of 16:30, 8 July 2021 by JoeStrout (talk | contribs) (Created page with "<c>Bounds.contains</c> returns true (1) if the given coordinates are within the bounds, and false (0) if they are outside the bounds. === Arguments === {| class=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bounds.contains returns true (1) if the given coordinates are within the bounds, and false (0) if they are outside the bounds.

Arguments

Parameter Name Type Default Value Meaning
x number 0 horizontal position
y number 0 vertical position

Usage Notes

The coordinate system is undefined, but the parameters are assumed to be in the same coordinate system as the bounds itself. So for example, if using this with Sprite.localBounds, then x and y should be coordinates local to the sprite. But if using it with Sprite.worldBounds, then x and y should be relative to the sprite display itself.