mercredi 27 avril 2016

What does the function map do in c++ 11?

I am trying to figure out what a piece of firmware code does on a particle elctron. It appears to be written in c++ and compiled against gnu++11 standard library linked to it. What does map do in this line of code. The value is set arbitrarily in this case but is actually the bitshift of an input value under normal load.

int value = 128;
return map(value, 0x000, 0xFFF, 0, 50000) / 10000.0;

Aucun commentaire:

Enregistrer un commentaire