Size

Hierarchy

  • Size

Implements

Index

Constructors

constructor

  • new Size(width: number, height: number): Size
  • Creates a Size object from the given width and height (floats).

    Parameters

    • width: number
    • height: number

    Returns Size

Properties

height

height: number

surface

surface: number

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

width

width: number

Methods

add

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

    Parameters

    Returns Size

clone

  • Returns a new Size copied from the given one.

    Returns Size

copyFrom

  • copyFrom(src: Size): void
  • Updates the current size from the given one. Returns the updated Size.

    Parameters

    Returns void

copyFromFloats

  • copyFromFloats(width: number, height: number): Size
  • Updates in place the current Size from the given floats. Returns the updated Size.

    Parameters

    • width: number
    • height: number

    Returns Size

equals

  • equals(other: Size): boolean
  • Boolean : True if the current Size and the given one width and height are strictly equal.

    Parameters

    Returns boolean

getClassName

  • getClassName(): string
  • Returns the string "Size"

    Returns string

getHashCode

  • getHashCode(): number
  • Returns the Size hash code.

    Returns number

multiplyByFloats

  • multiplyByFloats(w: number, h: number): Size
  • Returns a new Size set with the multiplication result of the current Size and the given floats.

    Parameters

    • w: number
    • h: number

    Returns Size

set

  • set(width: number, height: number): Size
  • Updates in place the current Size from the given floats. Returns the updated Size.

    Parameters

    • width: number
    • height: number

    Returns Size

subtract

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

    Parameters

    Returns Size

toString

  • toString(): string
  • Returns string

Static Lerp

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

    Parameters

    Returns Size

Static Zero

  • Returns a new Size set to (0.0, 0.0)

    Returns Size

Generated using TypeDoc