]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.15
authorfred <fred>
Tue, 10 Dec 1996 00:51:47 +0000 (00:51 +0000)
committerfred <fred>
Tue, 10 Dec 1996 00:51:47 +0000 (00:51 +0000)
src/misc.cc

index 54746fd836001b2d804e751b40a719ebeaf1e448..51baac1211f392936110b117a75185f037df9f46 100644 (file)
@@ -3,12 +3,19 @@
 
 #include <math.h>
 
-int intlog2(int d) {
+int
+intlog2(int d) {
     int i=0;
     while (!(d&1)) {
-       d/= 2; i++;
+       d/= 2;
+       i++;
     }
     assert(!(d/2));
     return i;
 }
 
+double
+log2(double x) {
+    return log(x)  /log(2.0);
+}
+