Mjolnir Core
Core functionality of the Mjolnir API
Functions
math.h File Reference

Contains basic mathematical functions. More...

#include "mjolnir/core/definitions.h"
#include "mjolnir/core/fundamental_types.h"
#include "mjolnir/core/utility/type.h"
#include <concepts>
#include <cassert>
Include dependency graph for math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<std::integral T_Type>
constexpr auto gauss_summation (T_Type n) -> T_Type
 Calculate the sum of the first n positive numbers. More...
 
template<std::integral T_Type>
constexpr auto is_power_of_2 (T_Type value) noexcept -> bool
 Return true if the passed value is a power of 2. More...
 
template<Number T_Type>
constexpr auto power (T_Type base, std::integral auto exponent) noexcept -> T_Type
 Calculate the power of a number using an integer based exponent. More...
 
template<Number T_Type = UST>
constexpr auto power_of_2 (std::integral auto exponent) noexcept -> T_Type
 Calculate the power of 2 using an integer based exponent. More...
 

Detailed Description

Contains basic mathematical functions.

math/math.h