Options
All
  • Public
  • Public/Protected
  • All
Menu

Implements IAspectRatio and provides helper methods.

Hierarchy

  • AspectRatio

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new AspectRatio(horizontal: number, vertical: number): AspectRatio
  • Initialize aspect ratio object.

    Parameters

    • horizontal: number

      horizontal dimension.

    • vertical: number

      vertical dimension.

    Returns AspectRatio

Properties

horizontal

horizontal: number

Horizontal dimension.

vertical

vertical: number

Vertical dimension.

Accessors

ratio

  • get ratio(): number
  • Returns aspect ratio.

    readonly

    Returns number

Methods

getHorizontalLength

  • getHorizontalLength(verticalLength: number): number
  • Calculates horizontal length based on vertical length provided.

    Parameters

    • verticalLength: number

      vertical length.

    Returns number

    • horizontal length.

getVerticalLength

  • getVerticalLength(horizontalLength: number): number
  • Calculates vertical length based on horizontal length provided.

    Parameters

    • horizontalLength: number

      horizontal length.

    Returns number

    • vertical length.

Generated using TypeDoc