Hi
I'm tryng to animate a text that display the distance between two objects.
I reach to add a scripted operator and to connect it to a ctr_dist value.
The problem is that the value I obtain with GetValue is a floating point with 16 decimals.
Here te result:
How I can reduce the number of decimals? I need to display only one or two decimals.
I tried also to convert the value from Float to Integer and creating two animated text, but as you can see in the pictures, the values are (obviously) approximated to the near integer and so, a value of 8,61 is displayed as 9.
Anyone knows how to solve it?
Reducing the number of decimals in a floating point value
Reducing the number of decimals in a floating point value
(sorry for my english)
Re: Reducing the number of decimals in a floating point value
round(ctr_dist( _nl., _nl1. ) * 100) / 100 - put this in the "Value" parameter
maybe there's even an easier way, but this is what came to my mind right away.
maybe there's even an easier way, but this is what came to my mind right away.
Tiago Beijoco
http://www.craft.host56.com
http://www.craft.host56.com
Who is online
Users browsing this forum: No registered users and 19 guests