aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-08 17:08:28 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-08 17:08:28 -0800
commitc64c1afb59280a80c11238ee24006c92b598ca8c (patch)
tree44eced2d3c702a73e8ab95d0251380f62c93db21 /src/utility.js
parentaf942f1c89bb5d35e3641da46c39c6f27b8ffce4 (diff)
support alignment in memset and memcpy in ta2
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utility.js b/src/utility.js
index 40b16a97..e49c8509 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -302,3 +302,7 @@ function sleep(secs) {
while (Date.now() - start < secs*1000) {};
}
+function log2(x) {
+ return Math.log(x)/Math.LN2;
+}
+