I am trying to figure out how I can round the value the slider
returns while it is being moved. My slider is set to continuously
send the data while it's moving, it sends data to the Audio Unit
plugin and also to a text box near it. While the slider is moving and
is not being relesed, the Audio Unit parameter also changes
continuously. Here's the code that does the job:
Now, for some parameters, I would like to simultaneously round the
value to the first or second decimal after the point, as seeing a
number with 4 or 5 decimals after the dot makes no visual sense. So I
changed the second line to:
As the slider is being moved, parameter changes smoothly for the
Audio Unit, e.g. 3.5 instead of 2.54121, but the text box shows
3.50000 or 3.49999 until the slider gets released - then it shows
3.5. How can I eliminate this issue which looks connected to
calculation precision?
Any suggestions would be very welcome!
Artemiy.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden