Antkeeper  0.0.1
Functions
math::compile Namespace Reference

Compile-time mathematical functions. More...

Functions

template<std::unsigned_integral T>
consteval T ceil_log2 (T x) noexcept
 Compile-time ceil(log2(x)) for unsigned integrals. More...
 
template<std::unsigned_integral T>
consteval T exp2 (T x) noexcept
 Compile-time exp2 for unsigned integrals. More...
 
template<std::unsigned_integral T>
consteval T pow (T x, T e) noexcept
 Compile-time pow for unsigned integrals. More...
 

Detailed Description

Compile-time mathematical functions.

Function Documentation

◆ ceil_log2()

template<std::unsigned_integral T>
consteval T math::compile::ceil_log2 ( x)
noexcept

Compile-time ceil(log2(x)) for unsigned integrals.

Parameters
xInput value.
Returns
ceil(log2(x)).

Definition at line 38 of file compile.hpp.

◆ exp2()

template<std::unsigned_integral T>
consteval T math::compile::exp2 ( x)
noexcept

Compile-time exp2 for unsigned integrals.

Parameters
xInput value.
Returns
exp2(x).

Definition at line 51 of file compile.hpp.

◆ pow()

template<std::unsigned_integral T>
consteval T math::compile::pow ( x,
e 
)
noexcept

Compile-time pow for unsigned integrals.

Parameters
xBase value.
eIntegral exponent.
Returns
x^e.

Definition at line 65 of file compile.hpp.