Jump to content

Some Simple Math


The Little Guy

Recommended Posts

I have been developing an android app, and I am stuck on some math (One thing I am not too good with).

 

So, I have a slide bar that you can drag left to right. By Default all the way left is 0 and all the way right is 100. I am trying to find a formula that will make all the way left will simulate -100 and all the way right will simulate +100 and 0 would be dead center.

 

For those not familiar with android programming, the event passes a position value to the event listener, which is a number between 0 and 100. I would like to take that number and convert it from -100 to +100.

 

Thanks for the help!

Link to comment
https://forums.phpfreaks.com/topic/270459-some-simple-math/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.