ioss 0.0.2

Io celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[test]
fn height_profile_min_max() {
    let hp = ioss::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() {
    let hp = ioss::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0, 25.0]);
    assert!(hp.roughness_index() > 0.0);
}

#[test]
fn great_circle_distance() {
    let a = ioss::surface::mapping::IoCoord::new(0.0, 0.0, 0.0);
    let b = ioss::surface::mapping::IoCoord::new(10.0, 10.0, 0.0);
    assert!(ioss::surface::mapping::great_circle_distance_km(a, b) > 0.0);
}

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

#[test]
fn zone_classification() {
    let z = ioss::surface::zones::zone_from_lat_lon(0.0, 100.0);
    assert_eq!(z.zone, ioss::surface::zones::IoZone::SulfurFlows);
}

#[test]
fn lava_lake_zone() {
    let z = ioss::surface::zones::zone_from_lat_lon(12.0, 310.0);
    assert_eq!(z.zone, ioss::surface::zones::IoZone::LavaLake);
}