Function glm::builtin::log2
[−]
[src]
pub fn log2<F: BaseFloat, T: GenFloat<F>>(x: T) -> T
Returns the base 2
logarithm of x
. i.e., the value y
which satisfies
x = 2y.
Results are undefined if x < 0
.
Example
use glm::{ log2, vec2 }; assert_eq!(log2(vec2(64., 256.)), vec2(6., 8.));