Function glm::ext::normalize_to
[−]
[src]
pub fn normalize_to<F: BaseFloat + GenFloat<F>, T: GenFloatVec<F>>(
x: T,
len: F
) -> T
Normalizes vector x
of specific length len
.
Example
use glm::length; use glm::ext::normalize_to; let v = glm::vec2(3., 4.); assert_eq!(length(normalize_to(v, 2.)), 2.);