callistos 0.0.1

Callisto celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[test]
fn height_profile_min_max() {
    let hp = callistos::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0]);
    let (min, max) = hp.min_max();
    assert!((min - 5.0).abs() < 1e-10);
    assert!((max - 20.0).abs() < 1e-10);
}

#[test]
fn roughness_index_positive() {
    let hp = callistos::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0, 25.0]);
    assert!(hp.roughness_index() > 0.0);
}

#[test]
fn great_circle_distance_nonzero() {
    let a = callistos::surface::mapping::CallistoCoord::new(0.0, 0.0, 0.0);
    let b = callistos::surface::mapping::CallistoCoord::new(10.0, 10.0, 0.0);
    let d = callistos::surface::mapping::great_circle_distance_km(a, b);
    assert!(d > 0.0);
}

#[test]
fn antipode_inverts_coordinates() {
    let a = callistos::surface::mapping::CallistoCoord::new(15.0, 30.0, 100.0);
    let b = callistos::surface::mapping::antipode(a);
    assert!((b.latitude_deg + 15.0).abs() < 1e-10);
}

#[test]
fn zone_classification() {
    let z = callistos::surface::zones::zone_from_lat_lon(15.0, 0.0);
    assert_eq!(
        z.zone,
        callistos::surface::zones::CallistoZone::ValhallaBasin
    );
}

#[test]
fn dark_terrain_low_albedo() {
    let z = callistos::surface::zones::zone_from_lat_lon(0.0, -150.0);
    assert_eq!(z.zone, callistos::surface::zones::CallistoZone::DarkTerrain);
    assert!(z.mean_albedo < 0.20);
}