A simple Rectangle class

Usage:

  • Initialize using Rect.get() var rect = Rect.get(0, 0, 100, 100);
  • Or with an array var rect:Rect = [0, 0, 100, 100];
  • Recycle rectangles when you're done with them: my_rect.put()

Variables

@:implbottom:Float

@:implheight:Float

@:implleft:Float

@:implread onlymidpoint:Vec2

@:implright:Float

@:impltop:Float

@:implwidth:Float

Methods

@:implinlinearea ():Float

@:implinlinecontains_point (this:Vec4):Bool

@:implinlineintersection (this:Vec4):Rect

@:implinlineis_empty ():Bool

@:implinlineput ():Void

@:value({ w : 0, z : 0, y : 0, x : 0 })@:implinlineset (this:Vec4, x:Float = 0, y:Float = 0, z:Float = 0):Rect

@:implinlineset_position (this:Vec4):Rect

@:impltoString ():String

Static methods

@:value({ height : 0, width : 0, y : 0, x : 0 })staticget (x:Float = 0, y:Float = 0, width:Float = 0, height:Float = 0):Rect