Function normalise

Source
pub fn normalise(a: &Vector3d, min_sq_value: f64) -> Option<Vector3d>
Expand description

Normalize a vector to lie on the surface of the unit sphere.

Note: this function returns an Option so uses the British spelling of normalise to differentiate it from the standard normalize function.

  • a the Vector3d
  • min_sq_value the minimum square of a vector length to normalize.

return the nomalized point or None if the vector is too small to normalize.