Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert number from one range to another

OldRange = (OldMax - OldMin)  
NewRange = (NewMax - NewMin)  
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #number #range
ADD COMMENT
Topic
Name
4+1 =