|
Hello, I have float variables like 4.101814. How can I reduce its lenght to 2, so it would look like this: 4.10 Thanks!
(comments are locked)
|
For efficiency you should use 100.0f but besides that absolutely right. Oh for all Unityscript users that example is written in C# but the actual computation is the same:
Aug 22 '11 at 04:28 PM
Bunny83
Thanks :)
Aug 23 '11 at 09:50 AM
Dreeka
(comments are locked)
|
|
If you want to display the float as string you should use a custom format string. In your case Thanks :)
Aug 23 '11 at 09:50 AM
Dreeka
(comments are locked)
|
