Maths Range To Percentage

后端 未结 3 905
离开以前
离开以前 2021-02-02 02:36

i need a bit of help with some maths.

I have a range 0 - 127 and i want to convert it into percentage.

So 0% = 0 and 100% = 127 and every number inbetween.

3条回答
  •  失恋的感觉
    2021-02-02 03:21

    If you want to go from a value to a percentage, eg from 63.5 to 50%, divide your value by 127 & multiply by 100.

    If you want to go the other way, eg from 50% to 63.5, it's the reverse: divide your percentage by 100 & multiply by 127.

提交回复
热议问题