Skip to content

round


floor function (generic::floor)

template <numeric T1> T1 floor(const T1 &x)

Returns the largest integer value not greater than @p x.
Template param T1 Numeric type.
Param x Input value.
Returns The largest integer value not greater than @p x.


ceil function (generic::ceil)

template <numeric T1> T1 ceil(const T1 &x)

Returns the smallest integer value not less than @p x.
Template param T1 Numeric type.
Param x Input value.
Returns The smallest integer value not less than @p x.


round function (generic::round)

template <numeric T1> T1 round(const T1 &x)

Returns the nearest integer value to @p x.
Template param T1 Numeric type.
Param x Input value.
Returns The nearest integer value to @p x.


trunc function (generic::trunc)

template <numeric T1> T1 trunc(const T1 &x)

Returns the integer part of @p x by removing its fractional part.
Template param T1 Numeric type.
Param x Input value.
Returns The truncated integer part of @p x.


fract function (generic::fract)

template <numeric T1> T1 fract(const T1 &x)

Returns the fractional part of @p x.
Template param T1 Numeric type.
Param x Input value.
Returns The fractional part of @p x.


ifloor function (generic::ifloor)

template <numeric T1> itype<T1> ifloor(const T1 &x)

Returns the largest integer value not greater than @p x, as an integer type.
Template param T1 Numeric type.
Param x Input value.
Returns Integer equivalent of floor(@p x).


iceil function (generic::iceil)

template <numeric T1> itype<T1> iceil(const T1 &x)

Returns the smallest integer value not less than @p x, as an integer type.
Template param T1 Numeric type.
Param x Input value.
Returns Integer equivalent of ceil(@p x).


iround function (generic::iround)

template <numeric T1> itype<T1> iround(const T1 &x)

Returns the nearest integer value to @p x, as an integer type.
Template param T1 Numeric type.
Param x Input value.
Returns Integer equivalent of round(@p x).


itrunc function (generic::itrunc)

template <numeric T1> itype<T1> itrunc(const T1 &x)

Returns the truncated integer part of @p x, as an integer type.
Template param T1 Numeric type.
Param x Input value.
Returns Integer equivalent of trunc(@p x).


fmod function (generic::fmod)

template <f_class T> T fmod(const T &x, const T &y)

Returns the floating-point remainder of dividing @p x by @p y.
Template param T Floating-point type.
Param x Dividend.
Param y Divisor.
Returns The remainder of the division @p x / @p y.


fmod class (generic::fn::fmod)

fmod

rem function (generic::rem)

template <not_f_class T, size_t N>
constexpr vec<T, N> rem(const vec<T, N> &x,
                        const vec<T, N> &y)

Returns the element-wise remainder of integer vectors @p x and @p y.
Template param T Integer type.
Template param N Number of elements in the vector.
Param x Dividend vector.
Param y Divisor vector.
Returns Element-wise remainder of @p x divided by @p y.


template <f_class T, size_t N>
vec<T, N> rem(const vec<T, N> &x, const vec<T, N> &y)

Returns the element-wise floating-point remainder of vectors @p x and @p y.
Template param T Floating-point type.
Template param N Number of elements in the vector.
Param x Dividend vector.
Param y Divisor vector.
Returns Element-wise floating-point remainder of @p x divided by @p y.


Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/