| Crates.io | gpoint |
| lib.rs | gpoint |
| version | 0.2.1 |
| created_at | 2021-07-09 18:42:53.389505+00 |
| updated_at | 2021-08-31 07:55:02.776611+00 |
| description | Wrapper for using libc's `printf("%g")` format for your floating point output |
| homepage | |
| repository | https://github.com/bestouff/gpoint |
| max_upload_size | |
| id | 420867 |
| size | 7,670 |
Prints floating-point exactly like a printf("%g", value), using a Display implementation via libc's printf()'s .
Use the crates.io repository; add this to your Cargo.toml along
with the rest of your dependencies:
[dependencies]
gpoint = "0.2"
Then wrap your f32 or f64 with a GPoint:
use gpoint::GPoint;
println!("answer: {}", GPoint(42.));
See the API documentation for further details.