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 | -- |

| compass | | rpm |

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 class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • constructor

      constructor

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

      from

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

      type

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

      type

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

      resolveType

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

      [Symbol.toPrimitive]

      (
      hint
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      return this.value;
    • method

      as

      (
      toType , value
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      No inner type, return a new Angle with this type Angle(30).tau
    • method

      table

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

      toLongString

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

      invert

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      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 class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      A plain number with extra tools to quickly call out the common angles
    • method

      toAngle

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

    generateAngleFunctions

    =
    function ( )
    console.log(name)