CLASSES
TagsA - Z

Size

Description

class Size

Constructor

new Size(width, height)

Creates a Size object from the passed width and height (floats).

Parameters

Name Type Description
width number
height number

Members

width : number

height : number

surface : number

Returns the surface of the Size : width * height (float).

Methods

toString() → string

getClassName() → string

Returns the string "Size"

getHashCode() → number

Returns the Size hash code.

copyFrom(src) → void

Updates the current size from the passed one.

Returns the updated Size.

Parameters

Name Type Description
src Size

copyFromFloats(width, height) → Size

Updates in place the current Size from the passed floats.

Returns the updated Size.

Parameters

Name Type Description
width number
height number

set(width, height) → Size

Updates in place the current Size from the passed floats.

Returns the updated Size.

Parameters

Name Type Description
width number
height number

multiplyByFloats(w, h) → Size

Returns a new Size set with the multiplication result of the current Size and the passed floats.

Parameters

Name Type Description
w number
h number

clone() → Size

Returns a new Size copied from the passed one.

equals(other) → boolean

Boolean : True if the current Size and the passed one width and height are strictly equal.

Parameters

Name Type Description
other Size

static Zero() → Size

Returns a new Size set to (0.0, 0.0)

add(otherSize) → Size

Returns a new Size set as the addition result of the current Size and the passed one.

Parameters

Name Type Description
otherSize Size

subtract(otherSize) → Size

Returns a new Size set as the subtraction result of the passed one from the current Size.

Parameters

Name Type Description
otherSize Size

static Lerp(start, end, amount) → Size

Returns a new Size set at the linear interpolation "amount" between "start" and "end".

Parameters

Name Type Description
start Size
end Size
amount number