Class CalcAbstract

Abstract class supporting various arithmetical helper functions

Constructors

Properties

Methods

Constructors

Properties

deg2rad: number = ...

factor multiplied with angle in degrees yields the angle in radian

rad2deg: number = ...

factor multiplied with angle in radian yields the angle in degrees

Methods

  • Returns one of the values passed in, either _value if within _min and _max or the boundary being exceeded by _value

    Type Parameters

    • T

    Parameters

    • _value: T
    • _min: T
    • _max: T
    • _isSmaller: ((_value1, _value2) => boolean) = ...
        • (_value1, _value2): boolean
        • Parameters

          • _value1: T
          • _value2: T

          Returns boolean

    Returns T

  • Returns the linear interpolation between two values (_a, _b) for the given interpolation factor (_f). f is clamped between 0 and 1.

    Parameters

    • _a: number
    • _b: number
    • _f: number

    Returns number