Class Size
Hierarchy
- Size
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Creates a Size object from the given width and height (floats).
Parameters
width: number
width of the new size
height: number
height of the new size
Returns Size
Properties
heightSearch playground for height
Height
widthSearch playground for width
Width
Accessors
surface
The surface of the Size : width * height (float).
Returns number
Methods
addSearch playground for add
cloneSearch playground for clone
Clones the size
Returns Size
a new Size copied from the given one.
copy FromSearch playground for copyFrom
Updates the current size from the given one.
Parameters
src: Size
the given size
Returns void
copy From FloatsSearch playground for copyFromFloats
Updates in place the current Size from the given floats.
Parameters
width: number
width of the new size
height: number
height of the new size
Returns Size
the updated Size.
equalsSearch playground for equals
True if the current Size and the given one width and height are strictly equal.
Parameters
other: Size
the other size to compare against
Returns boolean
True if the current Size and the given one width and height are strictly equal.
get Class NameSearch playground for getClassName
"Size"
Returns string
the string "Size"
get Hash CodeSearch playground for getHashCode
Returns the Size hash code.
Returns number
a hash code for a unique width and height
multiply By FloatsSearch playground for multiplyByFloats
Multiplies the width and height by numbers
Parameters
w: number
factor to multiple the width by
h: number
factor to multiple the height by
Returns Size
a new Size set with the multiplication result of the current Size and the given floats.
scaleSearch playground for scale
Scales the width and height
Parameters
scale: number
the scale to multiply the width and height by
Returns Size
a new Size set with the multiplication result of the current Size and the given floats.
setSearch playground for set
Updates in place the current Size from the given floats.
Parameters
width: number
width to set
height: number
height to set
Returns Size
the updated Size.
subtractSearch playground for subtract
to StringSearch playground for toString
Returns a string with the Size width and height
Returns string
a string with the Size width and height
Static LerpSearch playground for Lerp
Creates a new Size set at the linear interpolation "amount" between "start" and "end"
Parameters
start: Size
starting size to lerp between
end: Size
end size to lerp between
amount: number
amount to lerp between the start and end values
Returns Size
a new Size set at the linear interpolation "amount" between "start" and "end"
Static ZeroSearch playground for Zero
Create a new size of zero
Returns Size
a new Size set to (0.0, 0.0)
Size containing width and height