]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/math/log2/shim.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / es5-ext / math / log2 / shim.js
1 'use strict';
2
3 var log = Math.log, LOG2E = Math.LOG2E;
4
5 module.exports = function (x) {
6         if (isNaN(x)) return NaN;
7         x = Number(x);
8         if (x < 0) return NaN;
9         if (x === 0) return -Infinity;
10         if (x === 1) return 0;
11         if (x === Infinity) return Infinity;
12
13         return log(x) * LOG2E;
14 };