/// Calculates te solid angle of a certain bin
Calculates te solid angle of a certain bin
Calculates te solid angle of a certain bin
pub fn bin_solid_angle(&self, nbin: usize) -> Float {
        if nbin == 0 {
            // Ground... it is half a sphere
            return 2. * PI;
        }
        if nbin == self.n_bins - 1 {
            // Cap... a small cone
            let height = row_height(self.mf);
            return cone_solid_angle(height / 2.);
        }
        // Error
        if nbin > self.n_bins {
            panic!("Trying to get direction to a bin out of bounds... found {} but only {} are available", nbin, self.n_bins);
        }
        // All others
        let row = self.bins_row(nbin);
        let (low, high) = self.row_altitude(row);
        let n_bins = bins_in_row(self.mf, row);
        patch_solid_angle(high, low, n_bins)
    }
pub fn bin_solid_angle ( & self , nbin : usize ) -> Float { if nbin == 0 { // Ground... it is half a sphere return 2. * PI ; } if nbin == self . n_bins - 1 { // Cap... a small cone let height = row_height ( self . mf ) ; return cone_solid_angle ( height / 2. ) ; } // Error if nbin > self . n_bins { panic ! ( " " nbin self n_bins ) ; } // All others let row = self . bins_row ( nbin ) ; let ( low , high ) = self . row_altitude ( row ) ; let n_bins = bins_in_row ( self . mf , row ) ; patch_solid_angle ( high , low , n_bins ) }
Calculates te solid angle of a certain bin
Calculates te solid angle of a certain bin
&self
nbin
usize