Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "angle"

Index

Variables

Const DEGREES_0

DEGREES_0: 0 = 0

0 degrees in radians.

Const DEGREES_180

DEGREES_180: number = Math.PI

180 degrees in radians.

Const DEGREES_270

DEGREES_270: number = Math.PI * 1.5

270 degrees in radians.

Const DEGREES_360

DEGREES_360: number = Math.PI * 2

360 degrees in radians.

Const DEGREES_90

DEGREES_90: number = Math.PI / 2

90 degrees in radians.

Functions

fromDegrees

  • fromDegrees(degrees: number): number
  • Converts an angle in degrees to radians.

    Angle.fromDegrees(180) // Math.PI

    Parameters

    • degrees: number

      The angle in degrees

    Returns number

    The angle in radians

normalize

  • normalize(radians: number): number
  • Normalizes an angle to the interval 0, 2π.

    Angle.normalize(Math.PI * 3) // Math.PI

    Parameters

    • radians: number

      The angle in radians

    Returns number

    The normalized angle in radians

toDegrees

  • toDegrees(radians: number): number
  • Converts an angle in radians to degrees.

    Angle.toDegrees(Math.PI) // 180

    Parameters

    • radians: number

      The angle in radians

    Returns number

    The angle in degrees

Generated using TypeDoc