summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/math/hypot.js.map
blob: a5b8febf7be30e505f8e596b6cf8665ce41db139 (plain) (blame)
1
{"version":3,"sources":["../../../src/php/math/hypot.js"],"names":["module","exports","hypot","x","y","Math","abs","t","min","max","sqrt"],"mappings":";;AAAAA,OAAOC,OAAP,GAAiB,SAASC,KAAT,CAAgBC,CAAhB,EAAmBC,CAAnB,EAAsB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEAD,MAAIE,KAAKC,GAAL,CAASH,CAAT,CAAJ;AACAC,MAAIC,KAAKC,GAAL,CAASF,CAAT,CAAJ;;AAEA,MAAIG,IAAIF,KAAKG,GAAL,CAASL,CAAT,EAAYC,CAAZ,CAAR;AACAD,MAAIE,KAAKI,GAAL,CAASN,CAAT,EAAYC,CAAZ,CAAJ;AACAG,MAAIA,IAAIJ,CAAR;;AAEA,SAAOA,IAAIE,KAAKK,IAAL,CAAU,IAAIH,IAAIA,CAAlB,CAAJ,IAA4B,IAAnC;AACD,CAjBD","file":"hypot.js","sourcesContent":["module.exports = function hypot (x, y) {\n  //  discuss at: http://locutus.io/php/hypot/\n  // original by: Onno Marsman (https://twitter.com/onnomarsman)\n  // imprived by: Robert Eisele (http://www.xarg.org/)\n  //   example 1: hypot(3, 4)\n  //   returns 1: 5\n  //   example 2: hypot([], 'a')\n  //   returns 2: null\n\n  x = Math.abs(x)\n  y = Math.abs(y)\n\n  var t = Math.min(x, y)\n  x = Math.max(x, y)\n  t = t / x\n\n  return x * Math.sqrt(1 + t * t) || null\n}\n"]}