Tehforsch / diman

Define rust compile time unit systems using const generics
52 stars 2 forks source link

Debug printing convenience macro #47

Open Tehforsch opened 8 months ago

Tehforsch commented 8 months ago

It could be nice having a dbg-like macro that can quickly print a quantity in the desired unit with a call like qdbg!(vel -> m/s) which would effectively expand to something like println!("{} m/s", vel.in_meters_per_second());

Should be easy to implement, if one defines the functional macro from within the procedural macro (which sounds scary, but probably isnt)