Converting a value from one range to another
The “range” function is used to transfer a value from one range, for example, from 0 to 1000, to another, for example, from -1 to 1. To quickly get a value in different ranges, we can define a simple function.