Maker.js, a Microsoft Garage project, is a JavaScript library for creating and sharing modular line drawings for CNC and laser cutters.

View project on GitHub Star

Api - units Namespace

Index

Functions

conversionScale

  • conversionScale(srcUnitType: string, destUnitType: string): number
  • Get a conversion ratio between a source unit and a destination unit.

    Parameters

    • srcUnitType: string

      unitType converting from.

    • destUnitType: string

      unitType converting to.

    Returns number

    Numeric ratio of the conversion.

isValidUnit

  • isValidUnit(tryUnit: string): boolean
  • Check to see if unit type is a valid Maker.js unit.

    Parameters

    • tryUnit: string

      unit type to check.

    Returns boolean

    Boolean true if unit type is valid.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc