num-lazy
num-lazy helps you write numbers for generic-typed functions, reduce typing, and improve readability!
Why Num-Lazy
Let's write a generic circumference function using num-trait.
This doesn't look too bad. But you can imagine it getting out of hand for more complex functions. This is where num-lazy comes to the rescue! Let's implement using num-lazy.
Quick Start
Install num-lazy by:
>> cargo add num-lazy
Use declare_nums!{T} to bind num-lazy to generic type T.
use declare_nums;
use Float;
declare_nums!