Replace nrm_normalize() and vec3_normalize() calls
wahn opened this issue · comments
We could probably search & replace those functions:
https://www.rs-pbrt.org/doc/crates/pbrt/core/geometry/fn.vec3_normalize.html
https://www.rs-pbrt.org/doc/crates/pbrt/core/geometry/fn.nrm_normalize.html
By versions for Vector3
:
impl Vector3<Float> {
/// Compute a new vector pointing in the same direction but with unit
/// length.
pub fn normalize(&self) -> Vector3<Float> {
*self / self.length()
}
}
Same for Normal3
...