Guest User

change_range()

a guest
Jul 26th, 2018
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///change_range(value, min1, max1, min2, max2)
  2.  
  3. var value = argument[0];
  4. var min1 = argument[1];
  5. var max1 = argument[2];
  6. var min2 = argument[3];
  7. var max2 = argument[4];
  8.  
  9. return min2 + (max2 - min2) * ((value-min1)/(max1-min1))
RAW Paste Data