Re: Current tick mark index of NSSlider?
Re: Current tick mark index of NSSlider?
- Subject: Re: Current tick mark index of NSSlider?
- From: Glen Simmons <email@hidden>
- Date: Mon, 20 Dec 2004 17:34:46 -0600
On 20 Dec, 2004, at 4:27 PM, Andreas Mayer wrote:
Am 20.12.2004 um 23:04 Uhr schrieb Glen Simmons:
Am I missing something?
You do have:
- the minimum value (min)
- the maximum value (max)
- the number of tick marks (n)
- the actual value (a)
You want:
- the tick mark corresponding to the actual value (x)
x = (a-min)/((max-min)/n)
Right?
Yes, I'm a little slow today. Should've thought this one through. BTW,
the above should be:
x = (a-min) / ((max-min) / (n-1))
Thanks,
Glen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden