fn intersect_length_at_angle(&self, theta: f64) -> Option<f64> {
        let (sin_theta, cos_theta) = theta.to_f64().unwrap().sin_cos();
        let denom = sin_theta - self.slope * cos_theta;
        if denom.abs() > 1.0e-6 {
            Some(self.intercept / denom)
        } else {
            None
        }
    }
/// Given array starting at the origin at angle theta, determine
/// the signed length at which the ray intersects with the
/// boundary.
Given array starting at the origin at angle theta, determine
the signed length at which the ray intersects with the
boundary.
Given array starting at the origin at angle theta determine the signed length at which the ray intersects with the boundary .
fn intersect_length_at_angle(&self, theta: f64) -> Option<f64> {
        let (sin_theta, cos_theta) = theta.to_f64().unwrap().sin_cos();
        let denom = sin_theta - self.slope * cos_theta;
        if denom.abs() > 1.0e-6 {
            Some(self.intercept / denom)
        } else {
            None
        }
    }
fn intersect_length_at_angle ( & self , theta : f64 ) -> Option < f64 > { let ( sin_theta , cos_theta ) = theta . to_f64 ( ) . unwrap ( ) . sin_cos ( ) ; let denom = sin_theta - self . slope * cos_theta ; if denom . abs ( ) > 1.0e-6 { Some ( self . intercept / denom ) } else { None } }
Given array starting at the origin at angle theta, determine
the signed length at which the ray intersects with the
boundary.
Given array starting at the origin at angle theta determine the signed length at which the ray intersects with the boundary .
&self
theta
f64
&self
theta
f64