Function nalgebra_glm::reflect_vec
source ยท pub fn reflect_vec<T: Number, const D: usize>(
i: &TVec<T, D>,
n: &TVec<T, D>,
) -> TVec<T, D>
Expand description
For the incident vector i
and surface orientation n
, returns the reflection direction : result = i - 2.0 * dot(n, i) * n
.