|
I got a script with C#.For example: This is one function in the script. `` LineRender.SetColors(C1,C2);
(comments are locked)
|
|
I got a script with C#.For example: This is one function in the script. `` LineRender.SetColors(C1,C2);
(comments are locked)
|
Once you sign in you will be able to subscribe for any updates here
By RSS:The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
Topics:
asked: May 11 '12 at 03:40 AM
Seen: 865 times
Last Updated: Aug 07 '12 at 04:21 AM
0.5 is a double literal, just like "Hello" is a string literal! To make the language interpret it as a float (which has a lower precision, so it's right to stop you from doing this accidentally), you need to specify 'f' at the end. Hence:
(it's called a 'double' because it's twice the size of an average float in memory- and hence, about twice the precision)
Thanks,I got it.I almost forget this tips.
@syclamoth It's not twice the precision. It's potentially 4,294,967,296 times the precision! However, .NET/Mono uses some of the bits for extra size, and some of the bits for extra precision. Still, you get 256-512 times the precision, much more than 2x!