fn check_cap(ray: &Ray, t: f64) -> bool {
        let x = ray.origin.x + t * ray.direction.x;
        let z = ray.origin.z + t * ray.direction.z;

        (x.powi(2) + z.powi(2)) <= 1.0
    }
// Check if the intersection at `t` is within a radius of 1 (the cylinder radius) from the y axis.
//
Check if the intersection at `t` is within a radius of 1 (the cylinder radius) from the y axis.
Check if the intersection at ` t ` is within a radius of 1 ( the cylinder radius ) from the y axis .
fn check_cap(ray: &Ray, t: f64) -> bool {
        let x = ray.origin.x + t * ray.direction.x;
        let z = ray.origin.z + t * ray.direction.z;
        (x.powi(2) + z.powi(2)) <= 1.0
    }
fn check_cap ( ray : & Ray , t : f64 ) -> bool { let x = ray . origin . x + t * ray . direction . x ; let z = ray . origin . z + t * ray . direction . z ; ( x . powi ( 2 ) + z . powi ( 2 ) ) <= 1.0 }
Check if the intersection at `t` is within a radius of 1 (the cylinder radius) from the y axis.
Check if the intersection at ` t ` is within a radius of 1 ( the cylinder radius ) from the y axis .
ray
&Ray
t
f64