Skip to main content

alt

Macro alt 

Source
macro_rules! alt {
    ($value:expr; cm) => { ... };
    ($value:expr; m) => { ... };
    ($value:expr; km) => { ... };
    ($value:expr) => { ... };
}
Expand description

Quick creation of Altitude values.

  • alt!(10.0; cm) create an altitude of 10 centimeters.
  • alt!(10.0; m) create an altitude of 10 meters.
  • alt!(10.0; km) create an altitude of 10 kilometers.
  • alt!(10.0) create an altitude of 10 meters.

ยงExamples

use lat_long::alt;

assert_eq!("10 m".to_string(), alt!(10.0; m).to_string());