angle

<script src="./point_src/angle"></script>

A Nice angle conversion utility.

  • Angle extends Number

    a = Angle(180, 'deg') a.deg a.tau a.radians

    a = tau2.1 // Angle(a, 'tau') a.degrees


Functions:

char short name long
d deg degrees -
t tau turn -
g gon grad gradian
r rad rads radians
h hour hour -
b binary binary -
Meta Data
filepath_exists True
path angle
filepath angle.js
clean_files ()

  • VariableDeclaration
    const

    AngleConvertTable

    =
    ObjectExpression

    Angle convert tools list the available types, with functions to convert. For example radians to degrees AngleConvertTable.radians.degrees(rads)

    or deg * (10/9)

  • ClassDeclaration
    class comments:

    static convert = AngleConvertTable

    • property

      defaultType

      from Angle
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos', 'class_name'])
    • constructor

      constructor

      (
      value , type
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      defaultType = 'degrees'

    • method

      from

      (
      v , t
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • set

      type

      (
      v
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • get

      type

      (
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • method

      resolveType

      (
      v
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • method

      [Symbol.toPrimitive]

      (
      hint
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      return this.value;

    • method

      as

      (
      toType , value
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      No inner type, return a new Angle with this type Angle(30).tau

    • method

      table

      (
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • method

      toLongString

      (
      toType
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    • method

      invert

      (
      )
      from Angle
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      perform a 180

    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • VariableDeclaration
    let

    angleAliasStack

    =
    ObjectExpression

    , hour: ['h', 'hour']

  • VariableDeclaration
    let

    angleConstantsMap

    =
    new Map ( )

    Map the key value of the short name to the long name. The last key is automatically pluralised (may change.)

    d => degrees
    deg => degrees
    rad => radians
    
  • ClassDeclaration
    class comments:

    A plain number with extra tools to quickly call out the common angles

    • constructor

      constructor

      (
      v , type = deg
      )
      from AngleNumber
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])

      A plain number with extra tools to quickly call out the common angles

    • method

      toAngle

      (
      type
      )
      from AngleNumber
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos', 'class_name'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • VariableDeclaration
    const

    generateAngleFunctions

    =
    function ( )

    console.log(name)