Why not using 

#include <limits>

and then

float minX = std::numeric_limits< float >

This is cleaner. Please change it for every use.