Fix: changed from math.h to cmath where abs() got changed to std::abs()