Browse Source

Add inline to log2

tags/v1.1.6
Andrew Belt GitHub 5 years ago
parent
commit
95ddb89d07
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      include/math.hpp

+ 1
- 1
include/math.hpp View File

@@ -76,7 +76,7 @@ inline void eucDivMod(int a, int b, int* div, int* mod) {
}

/** Returns `floor(log_2(n))`, or 0 if `n == 1`. */
int log2(int n) {
inline int log2(int n) {
int i = 0;
while (n >>= 1) {
i++;


Loading…
Cancel
Save