#[derive(Debug, Clone, Copy, PartialEq)]
pub struct RimFeature {
pub name: &'static str,
pub elevation_m: f64,
pub slope_deg: f64,
}
impl RimFeature {
pub fn relief_energy(&self) -> f64 {
self.elevation_m * self.slope_deg.to_radians().tan()
}
}
pub fn primary_feature() -> RimFeature {
RimFeature {
name: "Cantaloupe ridge",
elevation_m: 1_000.0,
slope_deg: 20.0,
}
}
pub fn secondary_feature() -> RimFeature {
RimFeature {
name: "Geyser vent",
elevation_m: 200.0,
slope_deg: 45.0,
}
}