Skip to content

Function abs

function abs(int) demo

constexpr int abs(int x) { … }

Computes the absolute value of an integer.

Parameters
x Input integer value.
Returns
The absolute value of x.

Since

1.0.0

See also: abs(double)

Fully qualified name: ns::abs(int)

Declared at library.hpp:288

Function abs

function abs(double) demo

constexpr double abs(double x) { … }

Computes the absolute value of a floating-point number.

Parameters
x Input floating-point value.
Returns
The absolute value of x.

Since

1.1.0

Deprecated

Prefer std::abs for floating-point types.

See also: abs(int)

Fully qualified name: ns::abs(double)

Declared at library.hpp:296

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.