PDA

View Full Version : fprintf() and setprecision



ImpactDNI
01-07-2003, 10:13 AM
Alright, as many of you probably know, im just finishing up my .ase -> .dan converter... it exports now (the only reason for this, is to get rid of some spaces (.ase file = 45 megs, .dan right now is 22.8..) but, when i use fprintf() to export my normals.. even though in their arrays they are 0.xxxx, when it exports them, all of them are 0.xxxx00, is there anything like setprecision for fprintf() so that i can get it to only print to 4 decimal places?
Thanks in advance,
Dan Sherman

Bob
01-07-2003, 10:46 AM
printf("%.4f", ...);

ImpactDNI
01-08-2003, 05:36 AM
Whoo Hoo!!! yay, dont have class today, but ill remember that for tomorrow... w00t. Thats awesome, i calculated it out, with those 2 extra 0's at the end of each number, i had around an extra 800k 0's... that were useless... that should cut the file size down a bit!
Thanks a ton man
Love you forever!
Dan Sherman