normalizeValues.py 268 B

1234567891011121314
  1. userValue = 600
  2. axisDefault = 400
  3. axisMin = 100
  4. axisMax = 900
  5. if (userValue < axisDefault):
  6. normalizedValue = (userValue - axisDefault) / (axisDefault - axisMin)
  7. else:
  8. normalizedValue = (userValue - axisDefault) / (axisMax - axisDefault)
  9. print(normalizedValue)