pub fn cos_2_phi(w: &Vector3f) -> Float
Utility function to calculate square cosine via spherical coordinates.