ArduinoGeneral

How Does the map() Function Actually Work?

userHead Account cancelled 2022-02-07 14:41:04 129 Views0 Replies
I've been doing some side projects with AppleScript and Automator and was wondering how to manually implement the map() function (present in Arduino's IDE).
Like what basic numeric operations are happening https://showbox.tools/ https://speedtest.vet/ in the deep-end that actually return a result? A number goes in, along with an input range and an output range, and a proportionately-adjusted number comes out.
I've personally tested trying to manually implement it, but I'm missing something and the value isn't correct. Any help would be greatly appreciated.