EndGate.Size2d
Description: Defines a two dimensional size object which specifies a Width and Height.
Implements: EndGate.ICloneable
Constructors
Size2d (size)
Creates a new instance of Size2d.
size: number
Initial value of the Width and Height components of Size2d.
Size2d (width, height)
Creates a new instance of Size2d.
width: number
Initial value of the Width component of Size2d.
height: number
Initial value of the Height component of Size2d.
Fields
Width: number
Gets or sets the horizontal component of this Size structure.
Height: number
Gets or sets the vertical component of this Size structure.
Radius: number
Gets the radius that encompasses the two dimensional size of this Size2d.
HalfWidth: number
Gets half of the Width component of this Size2d.
HalfHeight: number
Gets half of the Height component of this Size2d.
Methods
Apply()
Executes the action with the Width and Height of this Size2d and sets the Width and Height to the corresponding return values.
Trigger()
Executes the action with the Width and Height of this Size2d.
Add()
Returns a Size2d that is the result of adding the Width and Height of this Size2d to the Width and Height of a Size2d.
Multiply()
Returns a Size2d that is the result of multiplying the Width and Height of this Size2d by the Width and Height of a Size2d.
Subtract()
Returns a Size2d that is the result of subtracting the Width and Height of this Size2d by the Width and Height of a Size2d.
SubtractFrom()
Returns a Size2d that is the result of subtracting the Width and Height of this Size2d from the Width and Height of a Size2d.
Divide()
Returns a Size2d that is the result of dividing the Width and Height of this Size2d by the Width and Height of a Size2d.
DivideFrom()
Returns a Size2d that is the result of dividing the Width and Height of this Size2d from the Width and Height of a Size2d.
Negate()
Returns a Size2d that is the negated version of this Size2d.
Equivalent()
Determines whether this Size2d has the same Width and Height of another Size2d.
Clone()
Returns a Size2d that has identical Width's and Height's as the current Size2d.
toString()
Overridden toString method to display Size2d in the (Width, Height) format.
Examples
There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.