Formula to get the decimal value (0 - 1) of percent range (25 - 400)?

by Microsis   Last Updated August 14, 2019 02:05 AM - source

I'm trying to reverse engineer a dial in an application I'm using (FL Studio if you are familiar).

The dial pictured below is set to it's default value in the middle, of 100%.

knob

  • All the way left: 0 = 25%
  • Default, middle: 0.5 = 100%
  • All the way right: 1 = 400%

Here are some more values in the range:

% 25 50 100 200 400 value 0 0.25 0.5 0.75 1.0

I've been spent hours trying to figure out the formula to return the decimal value (0 - 1) given the percentage (25 - 400) -- I want to be able to plug in a percent value, say 300 and get the decimal value for the dial. Any tips?

I think what's making the tough for me is it's not linear.

Any help with this is appreciated.

Tags : algorithms math


Related Questions



0x9e3779b9 golden number

Updated July 05, 2015 13:02 PM

Fast fixed-size (256 bit) integer modulo/division

Updated July 15, 2015 18:02 PM

Algorithm for windowed online covariance

Updated December 06, 2016 08:02 AM