Go Down

Topic: Suggest addition to description of 'map' function (Read 825 times) previous topic - next topic

aefields

Current version
"Does not constrain values to within the range, because out-of-range values are sometimes intended and useful. The constrain() function may be used either before or after this function, if limits to the ranges are desired. "

Suggested version
"Does not constrain values to within the range, because out-of-range values are sometimes intended and useful.  For example: if the incoming value is below the fromLow value, the outgoing value will be negative in proportion to the given toLow - toHigh range. The constrain() function may be used either before or after this function, if limits to the ranges are desired. "

I didn't know what exactly the map function would do with out-of range numbers.  With a short explanation like this I would have understood immediately.  I think it would be quite helpful to other learners (ok, noobs) like myself.

P.S. the reference page says to post suggestions in the forum and gives a link.  Is this the correct forum?


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy