I know this is a noobish question put i could not figure it out >.<
I have an number from -1000 to 1000 and I need to map it to numbers 0 to 200.
I think it has to do with the map() function but i’m not sure.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“0 would be 100, -500, would be 50 and 500 would be 150”
Then try the following function:
This way:
This will map your integers into integers. And since your target range is 10 times smaller, it will map ten different numbers to the same.
If you want to get a floating point number, try this: