Constructors
constructor
- new Rect(xMin, xMax, yMin, yMax): Rect
Parameters
- xMin: number
- xMax: number
- yMin: number
- yMax: number
Properties
Accessors
bottom
- get bottom(): number
Returns number
centerX
- get centerX(): number
Returns number
centerY
- get centerY(): number
Returns number
height
- get height(): number
Returns number
left
- get left(): number
Returns number
right
- get right(): number
Returns number
top
- get top(): number
Returns number
width
- get width(): number
Returns number
Methods
equals
- equals(other, epsilon?): boolean
Parameters
- other: Rect
- epsilon: number = 0.0001
Returns boolean
True if they are equal.
getIntersection
- getIntersection(other): Rect
Static
getNormalizedRect
- getNormalizedRect(source, dest): {
h: number;
w: number;
x: number;
y: number;
} Returns {
h: number;
w: number;
x: number;
y: number;
}
h: number
w: number
x: number
y: number
A rectangle.