Struct gpoint::GPoint [−][src]
#[repr(transparent)]pub struct GPoint(pub f64);
Expand description
A wrapper around floats providing an implementation of Display
which uses
the underlying libc
’s printf()
with format "%g"
, for when you need to
match exactly what C a program would output.
Available formatting options:
use gpoint::GPoint; format!("{}", GPoint(42.)); // => "42" format!("{:.3}", GPoint(1.2345)); // => "1.23" format!("{:4}", GPoint(42.)); // => " 42" format!("{:-4}", GPoint(42.)); // => "42 " format!("{:04}", GPoint(42.)); // => "0042" format!("{:+}", GPoint(42.)); // => "+42" format!("{:#4}", GPoint(42.)); // => "42.00"
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GPoint
impl UnwindSafe for GPoint
Blanket Implementations
Mutably borrows from an owned value. Read more