Remove unused roundUpToPowerOfTwo function

This commit is contained in:
Frederic Junod
2019-05-16 12:11:01 +02:00
parent a8e5cb1e12
commit c2058af13a
2 changed files with 1 additions and 51 deletions
-11
View File
@@ -1,7 +1,6 @@
/**
* @module ol/math
*/
import {assert} from './asserts.js';
/**
* Takes a number and clamps it to within the provided bounds.
@@ -43,16 +42,6 @@ export const cosh = (function() {
}());
/**
* @param {number} x X.
* @return {number} The smallest power of two greater than or equal to x.
*/
export function roundUpToPowerOfTwo(x) {
assert(0 < x, 29); // `x` must be greater than `0`
return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));
}
/**
* Returns the square of the closest distance between the point (x, y) and the
* line segment (x1, y1) to (x2, y2).