Closed ghost closed 2 years ago
Hello,
I have this simple code:
use cgmath::Vector3; fn main() { let test = Vector3::new(0.0, -0.0000000008739, 0.0); println!("{:?}", test); }
You would expect that it prints this: Vector3 [0.0, -0.0000000008739, 0.0]
Vector3 [0.0, -0.0000000008739, 0.0]
Instead it prints this: Vector3 [0.0, -8.739e-10, 0.0]
Vector3 [0.0, -8.739e-10, 0.0]
Am I doing something wrong?
Thanks in advance.
With kind regards, Lorenz
This is no specific to cgmath, that's what f32 debug output produces - https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f1c8488f7373c08e3229da21a910a352
Hello,
I have this simple code:
You would expect that it prints this:
Vector3 [0.0, -0.0000000008739, 0.0]
Instead it prints this:
Vector3 [0.0, -8.739e-10, 0.0]
Am I doing something wrong?
Thanks in advance.
With kind regards, Lorenz