Options
All
  • Public
  • Public/Protected
  • All
Menu

Convenience class for specifying and dealing with some precision issues.

Hierarchy

  • Precision

Index

Constructors

constructor

Properties

Static SMALLEST

SMALLEST: number = ...

Static TinyRotation

TinyRotation: number = 0.00001

Static VECTOR_TEST_PRECISION

VECTOR_TEST_PRECISION: number = 1e-6

Static epsilon

epsilon: number = 1e-6

Methods

Static ClampAbsAboveEpsilon

  • ClampAbsAboveEpsilon(a: number, epsilon?: number): number
  • Returns the number if it is greater than or equal to epsilon, otherwise returns signed epsilon.

    Values smaller than epsilon are clamped to be epsilon.

    Parameters

    • a: number

      the number being evaluated

    • epsilon: number = 1e-6

    Returns number

Static PEQ

  • PEQ(a: number, b: number): boolean

Static isTiny

  • isTiny(a: number, epsilon?: number): boolean
  • Returns true if the number is smaller than or equal to epsilon

    Parameters

    • a: number

      the number being evaluated

    • epsilon: number = 1e-6

    Returns boolean

Static signedTiny

  • signedTiny(a: number, epsilon?: number): number
  • Returns the number if it is greater than or equal to epsilon, otherwise returns signed epsilon.

    Values smaller than epsilon are clamped to be epsilon.

    Parameters

    • a: number

      the number being evaluated

    • Optional epsilon: number

    Returns number

Static signedTinyInt

  • signedTinyInt(a: number): number
  • Returns the integer if it is greater than or equal to 1, otherwise returns positive or negative 1.

    Values smaller than 1 are clamped to be 1.

    Parameters

    • a: number

      the number evaluated

    Returns number

Generated using TypeDoc