Function glm::builtin::inversesqrt [] [src]

pub fn inversesqrt<F: BaseFloat, T: GenFloat<F>>(x: T) -> T

Returns the inverse of the square root of x. i.e., the value 1/sqrt(x).

Results are undefined if x ≤ 0.

Example

use glm::{ inversesqrt, vec2 };
assert_eq!(inversesqrt(4_f32), 0.5);
assert_eq!(inversesqrt(vec2(64., 1.)), vec2(0.125, 1.));