#[derive(Debug, Clone, Copy, PartialEq)]
pub struct CryoFeature {
    pub name: &'static str,
    pub deposit_albedo: f64,
    pub age_gyr: f64,
}

impl CryoFeature {
    pub fn relative_youth_index(&self) -> f64 {
        (4.5 - self.age_gyr).max(0.0) / 4.5
    }
}

pub fn floor_deposit() -> CryoFeature {
    CryoFeature {
        name: "Chasmata floor",
        deposit_albedo: 0.32,
        age_gyr: 2.8,
    }
}

pub fn cryovolcanic_resurfacing_rate_mm_yr(heat_flux_mw_m2: f64) -> f64 {
    heat_flux_mw_m2.max(0.0) * 0.001
}
