std::abs(std::valarray)
From cppreference.com
Template:cpp/numeric/valarray/sidebar
Defined in header <valarray>
|
||
template< class T > valarray<T> abs( const valarray<T>& va ); |
||
Computes absolute value of each element in the value array. This is done by applying Template:cpp (unqualified) function.
Contents |
Parameters
va | - | value array to apply the operation to |
Return value
Value array containing absolute values of the values in va
.
Notes
Template:cpp/numeric/valarray/notes
Possible implementation
Example
See also
computes absolute value of an integral value (|x|) (function) | |
absolute value of a floating point value (|x|) (function) |