node_modules/mathjs/lib/type/unit/Unit.js
/**
   * Calculate the values for the angle units.
   * Value is calculated as number or BigNumber depending on the configuration
   * @param {{number: 'number' | 'BigNumber'}} config
   */
Calculate the values for the angle units.
Value is calculated as number or BigNumber depending on the configuration
@param {{number: 'number' | 'BigNumber'}} config
Calculate the values for the angle units . Value is calculated as number or BigNumber depending on the configuration @param {{ number : ' number ' | ' BigNumber ' }} config
function calculateAngleValues (config) {
    if (config.number === 'BigNumber') {
      var pi = constants.pi(type.BigNumber);
      UNITS.rad.value = new type.BigNumber(1);
      UNITS.deg.value = pi.div(180);        
      UNITS.grad.value = pi.div(200);       
      UNITS.cycle.value = pi.times(2);      
      UNITS.arcsec.value = pi.div(648000);   / 360 / 3600
      UNITS.arcmin.value = pi.div(10800);    / 360 / 60
    }
    else { 
      UNITS.rad.value = 1;
      UNITS.deg.value = Math.PI / 180;        
      UNITS.grad.value = Math.PI / 200;       
      UNITS.cycle.value = Math.PI * 2;        
      UNITS.arcsec.value = Math.PI / 648000;   / 360 / 3600;
      UNITS.arcmin.value = Math.PI / 10800;    / 360 / 60;
    }
    UNITS.radian.value = UNITS.rad.value;
    UNITS.degree.value = UNITS.deg.value;
    UNITS.gradian.value = UNITS.grad.value;
  }
function calculateAngleValues ( config ) { if ( config . number === 'BigNumber' ) { var pi = constants . pi ( type . BigNumber ) ; UNITS . rad . value = new type . BigNumber ( 1 ) ; UNITS . deg . value = pi . div ( 180 ) ; UNITS . grad . value = pi . div ( 200 ) ; UNITS . cycle . value = pi . times ( 2 ) ; UNITS . arcsec . value = pi . div ( 648000 ) ; UNITS . arcmin . value = pi . div ( 10800 ) ; } else { UNITS . rad . value = 1 ; UNITS . deg . value = Math . PI / 180 ; UNITS . grad . value = Math . PI / 200 ; UNITS . cycle . value = Math . PI * 2 ; UNITS . arcsec . value = Math . PI / 648000 ; UNITS . arcmin . value = Math . PI / 10800 ; } UNITS . radian . value = UNITS . rad . value ; UNITS . degree . value = UNITS . deg . value ; UNITS . gradian . value = UNITS . grad . value ; }
Calculate the values for the angle units.
Calculate the values for the angle units .
// 2 * pi / 360; // 2 * pi / 400; // 2 * pi // 2 * pi / 360 / 3600 // 2 * pi / 360 / 60 // number // 2 * pi / 360; // 2 * pi / 400; // 2 * pi // 2 * pi / 360 / 3600; // 2 * pi / 360 / 60; // copy to the full names of the angles