Javascript / jQuery - map a range of numbers to another range of numbers

后端 未结 8 1475

In other programming languages such as processing, there is a function which allows you to convert a number that falls within a range of numbers into a number within a diffe

8条回答
  •  北海茫月
    2020-12-02 18:17

    For a general purpose mapping function, which is what the OP asked for, go here:

    http://rosettacode.org/wiki/Map_range#JavaScript

提交回复
热议问题