Function glm::ext::projection
[−]
[src]
pub fn projection<F: BaseFloat, T: GenFloatVec<F>>(x: T, y: T) -> T
Projects x
on y
.
Example
use glm::vec2; use glm::ext::projection; assert_eq!(projection(vec2(1., 0.), vec2(1., 1.)), vec2(0.5, 0.5));