What does this formula mean? What is the name of it?

56 Views Asked by At

I am writing here because I have my doubts about a formula I was looking for a formula that provides me a range of number into percentage.

Let me explain what I mean.

  1. I have a Minimun and a Maximum number in this case. $Min = 0$ and $Max = 45$
  2. This is the formula I use to get the percentage between the min and max $ CurrentPercentage = \frac {Input - Min} {Max - Min} $
  3. The $ Input $ can be any number between $Min$ and $Max$

But now, I need a formula for the final result I'll try to explain.

let's say an example $Input = 22.5$ and $Output= 22.5$ which is 50% (0.5).

If the input is more than the $Max = 45 $ example $Input = 67.5$ the output should return like $Output = 22.5$

so my question is how should be my formula be like? I am a bit curious if the formula has a name.

Edit:

If the input is more than the $Max = 45 $

$Input = 67.5$ the output Must return $Output = 22.5$ (0.5) not (1.5)