I want to scale a value up to a different range.
x = between 0 and 96 (this max value will be variable)
y = between 0 and 128
In normal math the formula would be
y = x * (128/96)
or more general y = x * (maxvalue y / maxvalue x)
I am trying to figure out how do I code this in an object?
I have seen the "object"-solution by @thetechnobear
https://sebiik.github.io/community.axoloti.com.backup/t/scaling-values-object/3592/7 but I need the x range to be variable.
Very much apreciated if someone can help me out on this.