D
desktop
I have a program that writes something like this:
0 0 -1 0
-0.6 0.8 0 0
0.8 0 0 0
0 0 0 1
I write that with this statement:
std::cout << m[j] << " ";
in a loop. Is there some way to print all numbers with 3 decimals
including the potential minus, so I get something like this:
0.00 -1.0
-0.6 0.80
0.80 0.00
etc
0 0 -1 0
-0.6 0.8 0 0
0.8 0 0 0
0 0 0 1
I write that with this statement:
std::cout << m[j] << " ";
in a loop. Is there some way to print all numbers with 3 decimals
including the potential minus, so I get something like this:
0.00 -1.0
-0.6 0.80
0.80 0.00
etc