Class Open3dMath

Provides constants and static methods that are additional to Math.

Hierarchy

  • Open3dMath

Constructors

Methods

  • Limits a number to be specified within an interval of two numbers, by specifying a fixed minimum and maximum.

    Returns

    The clamped value.

    Parameters

    • value: number

      A number.

    • min: number

      A first bound.

    • max: number

      A second bound. This does not necessarily need to be larger or smaller than bound1.

    Returns number

  • the function to compare if two floating point numbers are equal.

    Remarks

    Note that two NaN values are not equal defined by javascript .

    Parameters

    • a: number
    • b: number
    • epsilon: number = Open3d.EPSILON

    Returns boolean

  • Determines whether a value is valid. The value is valid if it is a finite number and not NaN.

    Returns

    Parameters

    • x: number

    Returns boolean

  • Convert an angle from radians to degrees.

    Returns

    degrees

    Parameters

    • radians: number

      Radians to convert (180 degrees equals pi radians).

    Returns number

  • Convert an angle from degrees to radians.

    Returns

    radians

    Example

    Open3dMath.ToRadians(180) // returns pi
    

    Parameters

    • degrees: number

      Degrees to convert (180 degrees equals pi radians).

    Returns number

Generated using TypeDoc