Math question

Peter Bogdanoff bogdanoff at me.com
Fri Feb 26 16:38:38 EST 2016


Thanks Kay and Hermann,

I’m using the mobGUI slider.

The range of settings chosen on the slider can be -5 to +5. That range of values equals a span of 1 second—up to 1/2 second (300 blocks on the player) slower or faster. The actual position selected by the user will result in a time adjustment up to that or less.

Both of your methods seem to make sense and I’m trying them out now.

Thanks!

Peter


On Feb 26, 2016, at 12:27 PM, [-hh] <hh at livecode.org> wrote:

>> Kay C. wrote:
>> But then again I failed English so maybe I completely misunderstood what
>> Peter was trying to achieve with his slider. :-(
> 
> @Kay C.
> I didn't want to critisize you with my answer, sorry.
> 
> Of course you are correct with the "rounding", he said he can "vary the
> events by 1 second", sorry. So he should use
>    round(c*f(..))
> with my solution too, because that *gets* the thumbpos.
> 
> After your remark reading Peter's first post again it's still not
> clear for me what he really wants:
> 
> @Peter
> Could you please go more in detail.
> 
> You have a scrollbar of width 200,
>    startValue -300 (or -5*60),
>    endValue 300 (or 5*60).
> What is your target output for example at -300, -60, 60 and 300
> and some other values in between? What numbers do you wish to see
> there?
> 
> Possibly you are thinking of a scrollbar that varies it's thumbs
> units. Say for example, if the width of your scrollbar is 200:
> 
> from left to left+40 divides into -5*60 to -2*60
>      = 180 units scaled to width 40
> from left+40 to left+160 divides into -2*60 to 2*60
>      = 240 units scaled to width 120
> from left+160 to left+200=right divides into 2*60 to 5*60
>      = 180 units scaled to width 40
> 
> This would scale the **INPUT** (=the x-axis), what is possible
> to achieve, but you then have to script your own "showValue" field.
> 
> The current approaches of Kay and me scale the **OUTPUT** (= y-axis),
> usually quite different.
> 
> @Kay C.
> Do you agree with that second possible interpretation?
> 
> hh
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list