pub fn new(mf: usize) -> Self {
        if mf == 0 {
            panic!("When creating ReinhartSky: mf must be 1 or greater")
        }

        let n_rows = 7 * mf + 1;

        let height = row_height(mf);
        let mut acc = 0.0;
        let mut row_max_sin = Vec::with_capacity(n_rows - 1);
        let mut acc_bins = Vec::with_capacity(n_rows - 1);
        for row in 0..n_rows {
            // Fill the sin of the max angle of each row
            acc += height;
            row_max_sin.push(acc.sin());

            // Fill the accumulated number of bins after each line.
            if row == 0 {
                acc_bins.push(0)
            } else {
                acc_bins.push(acc_bins[row - 1] + bins_in_row(mf, row - 1))
            }
        }

        // Cap + Ground + others
        let n_bins = 1 + acc_bins[n_rows - 1] + 1;

        // Return
        Self {
            mf,
            n_rows,
            n_bins,
            row_max_sin,
            acc_bins,
        }
    }
/// Creates  a new Reinhart sky discretization
Creates  a new Reinhart sky discretization
Creates a new Reinhart sky discretization
pub fn new(mf: usize) -> Self {
        if mf == 0 {
            panic!("When creating ReinhartSky: mf must be 1 or greater")
        }
        let n_rows = 7 * mf + 1;
        let height = row_height(mf);
        let mut acc = 0.0;
        let mut row_max_sin = Vec::with_capacity(n_rows - 1);
        let mut acc_bins = Vec::with_capacity(n_rows - 1);
        for row in 0..n_rows {
            // Fill the sin of the max angle of each row
            acc += height;
            row_max_sin.push(acc.sin());
            // Fill the accumulated number of bins after each line.
            if row == 0 {
                acc_bins.push(0)
            } else {
                acc_bins.push(acc_bins[row - 1] + bins_in_row(mf, row - 1))
            }
        }
        // Cap + Ground + others
        let n_bins = 1 + acc_bins[n_rows - 1] + 1;
        // Return
        Self {
            mf,
            n_rows,
            n_bins,
            row_max_sin,
            acc_bins,
        }
    }
pub fn new ( mf : usize ) -> Self { if mf == 0 { panic ! ( " " ) } let n_rows = 7 * mf + 1 ; let height = row_height ( mf ) ; let mut acc = 0.0 ; let mut row_max_sin = Vec :: with_capacity ( n_rows - 1 ) ; let mut acc_bins = Vec :: with_capacity ( n_rows - 1 ) ; for row in 0 .. n_rows { // Fill the sin of the max angle of each row acc += height ; row_max_sin . push ( acc . sin ( ) ) ; // Fill the accumulated number of bins after each line. if row == 0 { acc_bins . push ( 0 ) } else { acc_bins . push ( acc_bins [ row - 1 ] + bins_in_row ( mf , row - 1 ) ) } } // Cap + Ground + others let n_bins = 1 + acc_bins [ n_rows - 1 ] + 1 ; // Return Self { mf , n_rows , n_bins , row_max_sin , acc_bins , } }
Creates  a new Reinhart sky discretization
Creates a new Reinhart sky discretization
mf
usize
mf
usize