Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Rect.Overlaps

Overlaps(other: Rect): bool;
bool Overlaps(Rect other);
def Overlaps(other as Rect) as bool
Overlaps(other: Rect, allowInverse: bool): bool;
bool Overlaps(Rect other, bool allowInverse);
def Overlaps(other as Rect, allowInverse as bool) as bool

Parameters

otherOther rectangle to test overlapping with.
allowInverseDoes the test allow the Rects' widths and heights to be negative?

Description

Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.