Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
std::fabs is an STL function to take the absolute value of a double.
std::fabs is defined in the header file cmath.h.
#include <cassert> |
std::abs can be used to calculate the absolute value of both an integer and a double, where std::fabs can only be used to obtain the absolute value of a double.
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.