C

MutableSize

A mutable size in 2D coordinate space with double precision values.
ImplementsInheritance Hierarchy

Remarks

This implementation stores the values of the width and height in double precision floating point members.

See Also

API

Size, ISize

Members

Show:

Constructors

Creates the initially empty size, that is both width and height are 0.0d.
Creates an instance using the values provided by the size instance.
This will not create a dynamic instance. The values will be copied from size immediately and no reference is held to that instance thereafter.

Parameters

size: ISize
A size to retrieve the initial values from.
Creates an instance using the given width and height.

Parameters

width: number
The width.
height: number
The height.

Properties

Gets or sets the height.
final
Determines whether the specified size is empty.
ISize instances are considered empty if their width or height is less than 0.0d.
readonly

Defined in

ISize.isEmpty
Gets or sets the width.
final

Methods

Create a clone of this object.
final

Return Value

Object
A clone of this object.
Determines whether another object is equal to this one.
final

Parameters

other: any
the other object to compare for equality

Return Value

boolean
true if other is considered equal to this instance.
Returns a hash code for this object.

The hash code is a numeric value that can be used to treat this object as a key in a hash table or similar data structure.

Two objects that are considered equal must have the same hash code. However, the reverse does not hold and two objects having the same hash code don't have to be equal. Ideally, the hash code should be roughly uniformly-distributed to prevent hash tables from performing poorly. Calculating the hash code is also a potentially frequent operation and should therefore be fast.

final

Return Value

number
the hash code for this object
Sets the coordinates of the size to the given values.

Parameters

newSize: ISize
The new location.
Sets the coordinates of the size to the given values.

Parameters

newWidth: number
The new x-coordinate
newHeight: number
The new y-coordinate
Creates a new Size instance with the current values of this size.

Return Value

Size
A new Size instance that has been initialized with the current values of size.

Defined in

ISize.toSize
Returns a that describes this instance.
final

Return Value

string
A that describes this instance.

Static Methods

Performs an explicit conversion from Size to MutableSize.
static

Parameters

size: Size
The size.

Return Value

MutableSize
The result of the conversion.
Performs an implicit conversion from MutableSize to Size.
static

Parameters

size: MutableSize
The size.

Return Value

Size
The result of the conversion.