pub fn validate_ray_dir(dir: [f64; 3]) -> Result<()>
Validate that a ray direction is non-zero and finite.