Function glm::ext::recip_length
[−]
[src]
pub fn recip_length<F: BaseFloat + GenFloat<F>, T: GenFloatVec<F>>(x: T) -> F
Returns the reciprocal (inverse) of the length of vector x
.
Example
use glm::*; use glm::ext::*; let v = vec2(3., 4.); assert_eq!(recip_length(v), 0.2);