blob: 6846759ea3a109d9ad6ffd0305ec90362bb93367 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
'use strict';
module.exports = function log(arg, base) {
// discuss at: http://locutus.io/php/log/
// original by: Onno Marsman (https://twitter.com/onnomarsman)
// improved by: Brett Zamir (http://brett-zamir.me)
// example 1: log(8723321.4, 7)
// returns 1: 8.212871815082147
return typeof base === 'undefined' ? Math.log(arg) : Math.log(arg) / Math.log(base);
};
//# sourceMappingURL=log.js.map
|