Yes, but nothing in that calculation is being done as a float unless you tell the compiler to assume the other pieces of the calculation are float.
average = (float)total /(float)numReadings;
But then you need to look at the documentation for "map". Doesn't and can't work with float.
Paul