3 releases
0.0.3 | Mar 13, 2022 |
---|---|
0.0.2 | Mar 2, 2022 |
0.0.1 | Mar 1, 2022 |
#6 in #util-lib
46 downloads per month
Used in 2 crates
4KB
Description
Proc-macro for generating Frac from a decimal literal in const context.
Usage
use ::real_proc::frac;
use ::const_frac::Frac;
const CONST: Frac = frac!(const_frac, 3.14e-20);
let int = Frac::from_int(314);
let right = int * Frac::from_exp10(-22);
assert_eq!(CONST, right);
Project status
This package is in the very early stage.
Dependencies
~2.5MB
~54K SLoC