Math » ceil() module

Constexpr-friendly alternatives to std::ceil.

Functions

auto ceil(half x) -> half constexpr noexcept
Returns the ceiling of a half-precision float.
auto ceil(float x) -> float constexpr noexcept
Returns the ceiling of a float value.
auto ceil(double x) -> double constexpr noexcept
Returns the ceiling of a double value.
auto ceil(long double x) -> long double constexpr noexcept
Returns the ceiling of a long double value.
auto ceil(float128_t x) -> float128_t constexpr noexcept
Returns the ceiling of a float128_t value.
auto ceil(_Float16 x) -> _Float16 constexpr noexcept
Returns the ceiling of a _Float16 value.
template <typename T>
auto ceil(T x) -> double constexpr noexcept
Returns the ceiling of an integer.
template <typename S, size_t D>
auto ceil(const vector<S, D>& v) -> vector<S, D> constexpr noexcept
Returns a copy of a vector with all scalar components set to the lowest integer not less than their original values.

Function documentation

half ceil(half x) constexpr noexcept
#include <muu/half.h>

Returns the ceiling of a half-precision float.

float ceil(float x) constexpr noexcept
#include <muu/math.h>

Returns the ceiling of a float value.

double ceil(double x) constexpr noexcept
#include <muu/math.h>

Returns the ceiling of a double value.

long double ceil(long double x) constexpr noexcept
#include <muu/math.h>

Returns the ceiling of a long double value.

float128_t ceil(float128_t x) constexpr noexcept
#include <muu/math.h>

Returns the ceiling of a float128_t value.

_Float16 ceil(_Float16 x) constexpr noexcept
#include <muu/math.h>

Returns the ceiling of a _Float16 value.

#include <muu/math.h>
template <typename T>
double ceil(T x) constexpr noexcept

Returns the ceiling of an integer.

template <typename S, size_t D>
vector<S, D> ceil(const vector<S, D>& v) constexpr noexcept

Returns a copy of a vector with all scalar components set to the lowest integer not less than their original values.