suddenly compiler decided that sqrt not defined. adding cmath and std:

+// stl:
+#include <cmath>

std::sqrt(