I should have done it from the first post! Sorry.
What actually troubles me with printf, except the fact that this is C, is that I have to know the exact max number of the digits of the coordinates. However, setting a usually big number does not seem a problem, is it?
Code:
printf("%5f %5f %5f\n", vertices[i].x(), vertices[i].y(), vertices[i].z()); // same for 2 instead of 5
Code:
0.000000 1.000000 1.618034
0.000000 1.000000 -1.618034
0.000000 -1.000000 -1.618034
0.000000 -1.000000 1.618034
1.000000 1.618034 0.000000
1.000000 -1.618034 0.000000
-1.000000 1.618034 0.000000
-1.000000 -1.618034 0.000000
1.618034 0.000000 1.000000
1.618034 0.000000 -1.000000
-1.618034 0.000000 1.000000
-1.618034 0.000000 -1.000000
Code:
printf("%10f %10f %10f\n", vertices[i].x(), vertices[i].y(), vertices[i].z());
Code:
Vertices = 12
0.000000 1.000000 1.618034
0.000000 1.000000 -1.618034
0.000000 -1.000000 -1.618034
0.000000 -1.000000 1.618034
1.000000 1.618034 0.000000
1.000000 -1.618034 0.000000
-1.000000 1.618034 0.000000
-1.000000 -1.618034 0.000000
1.618034 0.000000 1.000000
1.618034 0.000000 -1.000000
-1.618034 0.000000 1.000000
-1.618034 0.000000 -1.000000