I’m new on the forum and I need help about my final project for exams.
I’ve made over 90% of the job and I need few help to finish this. Since 2/3 weeks I’m searching for a way but it continues to be wrong
So, when I execute my program, all is working like I want and a graphical window is appearing as normal when you can take a look to theoretical curves of the BMI.
On the first part, the user is questionned about his age, his weight and his size. He enters his answers then the windows is appearing perfectly.
Moreover, I’d like to create “the point of the user”, I mean, I’d like that a point appears according to his BMI and his age ; but I don’t find any way to do that
So I implore your help
Hope to get answers !
See ya !
PS : Sorry for my bad english, I’m from France and only seventeen years old
float result (e.g. x) = map(
Input value (the age),
range start 1, range end 1,
range start 2, range end 2);
let’s say your age is between 10 and 18: that’s range 1.
And you want to show it on the window which is the range from 0 to width - that’s range 2:
Then map let’s you find the value you need on the 2nd range (x).
float x = map(age,
10,18,
0,width);
map returns basically the percentage of the value (age) on the first range applied to the 2nd range.