Function glm::ext::recip [] [src]

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

Returns the reciprocal (inverse) of float number x.

Example

use glm::ext::recip;

let x = 2f32;
let y = glm::vec3(1., 2., 4.);
assert_eq!(recip(x), 0.5);
assert_eq!(recip(y), glm::vec3(1., 0.5, 0.25));