Fixed inconsistencies in float math function usage.
float and double functions mixed. fabsf, floor, ceilf, fmodf changed.