gpoint

Crates.iogpoint
lib.rsgpoint
version0.2.1
sourcesrc
created_at2021-07-09 18:42:53.389505
updated_at2021-08-31 07:55:02.776611
descriptionWrapper for using libc's `printf("%g")` format for your floating point output
homepage
repositoryhttps://github.com/bestouff/gpoint
max_upload_size
id420867
size7,670
Xavier Bestel (bestouff)

documentation

https://docs.rs/gpoint

README

"G" Format for Floating Point

Prints floating-point exactly like a printf("%g", value), using a Display implementation via libc's printf()'s .

Usage

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.

Commit count: 16

cargo fmt