#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TerrainMaterial {
    DarkRegolith,
    IcyBright,
    CraterEjecta,
    RedUnit,
}

pub fn material_from_albedo(albedo: f64, red_unit: bool) -> TerrainMaterial {
    if red_unit && albedo < 0.08 {
        TerrainMaterial::RedUnit
    } else if albedo < 0.18 {
        TerrainMaterial::DarkRegolith
    } else if albedo > 0.40 {
        TerrainMaterial::IcyBright
    } else {
        TerrainMaterial::CraterEjecta
    }
}
