summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/math/log10.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/locutus/php/math/log10.js')
-rw-r--r--node_modules/locutus/php/math/log10.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/locutus/php/math/log10.js b/node_modules/locutus/php/math/log10.js
new file mode 100644
index 0000000..3c36309
--- /dev/null
+++ b/node_modules/locutus/php/math/log10.js
@@ -0,0 +1,16 @@
+"use strict";
+
+module.exports = function log10(arg) {
+ // discuss at: http://locutus.io/php/log10/
+ // original by: Philip Peterson
+ // improved by: Onno Marsman (https://twitter.com/onnomarsman)
+ // improved by: Tod Gentille
+ // improved by: Brett Zamir (http://brett-zamir.me)
+ // example 1: log10(10)
+ // returns 1: 1
+ // example 2: log10(1)
+ // returns 2: 0
+
+ return Math.log(arg) / 2.302585092994046; // Math.LN10
+};
+//# sourceMappingURL=log10.js.map \ No newline at end of file