dimforge / dimforge/nalgebra

printing/formatting issue with Vector2 type

Open
#603 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

Hi, I am having printing/formatting issues with the Vector2 type. Printing the vector with
```rust
println!("{:?}", vec);
```
works fine, and outputs:
```bash
Matrix { data: [0.00012840252, 0.0014672138] }
```
Printing without debug is a little broken tough, due to the precision of the values in the vector. I guess the `width` calculation is erroneous [here](https://www.nalgebra.org/rustdoc/src/nalgebra/base/matrix.rs.html#1362-1431)?
```rust
println!("{}", vec);
```
results in
```bash
┌ ┐
│ -0.002677636 │
│ -0.00059153046 │
└ ┘
```

#### System info:
* compiling on `ubuntu 18.04`
* running on `armv7-unknown-linux-gnueabihf`
* rustc version `1.34.2`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.