POV-Ray : Newsgroups : povray.beta-test : #write and float decimal places : Re: #write and float decimal places Server Time
29 Jul 2024 22:22:26 EDT (-0400)
  Re: #write and float decimal places  
From: Mark James Lewin
Date: 28 Feb 2002 22:24:22
Message: <3C7EF399.A0F54239@yahoo.com.au>
Warp wrote:

>   Floats can have something like 15 decimals (and they can be all printed).

Any float I specify with longer than 6dp will be rounded to 6dp when str is used,
or 5dp if I try to use #write with the float identifier. Eg. for me...

#declare I=1.0000003;

#fopen Output "Output.txt" write

#write(Output,I,"\n") // written to file as 1
#write(Output,str(I,0,-1),"\n") // written to file as 1.000000

#fclose Output

Am I missing something here?

MJL

--
text{ttf"timrom.ttf"concat(#local O=1;#while(O<7)chr(val(substr(concat(#local Q=
1;#while(Q<7)str(asc(substr("???<?>",Q,1))-56,0,0),#local Q=Q+1;#end""),O,2))),#
local O=O+2;#end"").1,0pigment{rgb 9}translate-<1,.3,-2>} // MJL


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.