#output #points #gpoint #g-point

gpoint

Wrapper for using libc’s printf("%g") format for your floating point output

7 releases

0.2.1 Aug 31, 2021
0.2.0 Aug 27, 2021
0.1.4 Aug 27, 2021
0.1.3 Jul 12, 2021

#173 in Value formatting

Download history 5955/week @ 2024-12-17 6047/week @ 2024-12-24 5462/week @ 2024-12-31 5554/week @ 2025-01-07 5576/week @ 2025-01-14 4818/week @ 2025-01-21 5422/week @ 2025-01-28 4149/week @ 2025-02-04 3716/week @ 2025-02-11 3840/week @ 2025-02-18 3701/week @ 2025-02-25 3572/week @ 2025-03-04 3595/week @ 2025-03-11 2139/week @ 2025-03-18 1400/week @ 2025-03-25 1343/week @ 2025-04-01

9,057 downloads per month
Used in scx_lavd

MIT/Apache

8KB
166 lines

Wrapper for using libc's printf("%g") format for your floating point output


"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.

Dependencies

~43KB