Skip to main content

mw

Macro mw 

Source
macro_rules! mw {
    ($($literal:tt)+) => { ... };
}
Expand description

A power literal in megawatts, exact and checked at compile time.

use flexibility::{mw, Power};
assert_eq!(mw!(1.5), Power::from_watts(1_500_000));