pub fn salary(&self, step: i32, period: Period) -> Option<f64> {
        let base = self.salary.get(step as usize -1);

        let base = match base {
            Some(b) => *b as f64,
            None => 0.0,
        };

        let period_salary = match period {
            Period::Annual => base as f64,
            Period::Weekly => base as f64 / 26.0,
            Period::Daily => base as f64 / 260.0,
            Period::Hourly => base as f64 / (260.0 * 7.5)
        };

        if period_salary == 0.0 {
            None
        } else {
            Some(round_to_2_decimal_points(period_salary))
        }
    }
/// The range of salary steps within a rate of pay. An array of integers.
The range of salary steps within a rate of pay. An array of integers.
The range of salary steps within a rate of pay . An array of integers .
pub fn salary(&self, step: i32, period: Period) -> Option<f64> {
        let base = self.salary.get(step as usize -1);
        let base = match base {
            Some(b) => *b as f64,
            None => 0.0,
        };
        let period_salary = match period {
            Period::Annual => base as f64,
            Period::Weekly => base as f64 / 26.0,
            Period::Daily => base as f64 / 260.0,
            Period::Hourly => base as f64 / (260.0 * 7.5)
        };
        if period_salary == 0.0 {
            None
        } else {
            Some(round_to_2_decimal_points(period_salary))
        }
    }
pub fn salary ( & self , step : i32 , period : Period ) -> Option < f64 > { let base = self . salary . get ( step as usize - 1 ) ; let base = match base { Some ( b ) => * b as f64 , None => 0.0 , } ; let period_salary = match period { Period :: Annual => base as f64 , Period :: Weekly => base as f64 / 26.0 , Period :: Daily => base as f64 / 260.0 , Period :: Hourly => base as f64 / ( 260.0 * 7.5 ) } ; if period_salary == 0.0 { None } else { Some ( round_to_2_decimal_points ( period_salary ) ) } }
The range of salary steps within a rate of pay.
The range of salary steps within a rate of pay .
&self
step
i32
period
Period