Variable geomutilsConst

geomutils: {
    nsectAngle(pA, pB, pC, n): Line[];
    wrapMax(x, max): number;
    wrapMinMax(x, min, max): number;
} = ...

A collection of usefull geometry utilities.

Type declaration

  • nsectAngle:function
    • Compute the n-section of the angle – described as a triangle (A,B,C) – in point A.

      Parameters

      • pA: Vertex

        The first triangle point.

      • pB: Vertex

        The second triangle point.

      • pC: Vertex

        The third triangle point.

      • n: number

        The number of desired angle sections (example: 2 means the angle will be divided into two sections, means an returned array with length 1, the middle line).

      Returns Line[]

      An array of n-1 lines secting the given angle in point A into n equal sized angle sections. The lines' first vertex is A.

  • wrapMax:function
    • Wrap the value (e.g. an angle) into the given range of [0,max).

      Parameters

      • x: number

        The value to wrap.

      • max: number

        The max bound to use for the range.

      Returns number

      The wrapped value inside the range [0,max).

      Name

      wrapMax

  • wrapMinMax:function
    • Wrap the value (e.g. an angle) into the given range of [min,max).

      Parameters

      • x: number

        The value to wrap.

      • min: number

        The min bound to use for the range.

      • max: number

        The max bound to use for the range.

      Returns number

      The wrapped value inside the range [min,max).

      Name

      wrapMinMax

Global

Generated using TypeDoc