std::abs(float), std::fabs
From cppreference.com
| Defined in header <cmath>
|
||
| float abs( float arg ); |
||
| double abs( double arg ); |
||
| long double abs( long double arg ); |
||
| float fabs( float arg ); |
||
| double fabs( double arg ); |
||
| long double fabs( long double arg ); |
||
| double fabs( Integral arg ); |
(since C++11) | |
Computes the absolute value of a floating point value arg.
Parameters
| arg | - | floating point value |
Return value
the absolute value of arg (|arg|)