31constexpr l_floating E = 2.7182818284590452353602874713526624977572470937000;
40constexpr l_floating PI = 3.1415926535897932384626433832795028841971693993751;
60template<
typename TYPE>
81template<
typename TYPE>
102template<
typename TYPE>
175template<std::
integral INTEGER =
int>
182template<
typename TYPE>
185 return a > TYPE{} ? a : -a;
188template<
typename TYPE>
191 return a > b ? a : b;
194template<
typename TYPE>
197 return a < b ? a : b;
214template <std::
integral INTEGER>
217 if (steps == 0 || (start - end) * steps > 0) {
221 for (INTEGER i = start; i < end; i += steps) {
225 for (INTEGER i = start; i > end; i += steps) {
Lazy sequence generator using C++20 coroutines.
Definition coroutines.h:57
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Exception for invalid parameter values.
Definition error.h:219
C++20 coroutine support with generator pattern implementation.
Custom exception classes and callback validation utilities.
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:254
double floating
Double-precision floating-point type.
Definition config.h:283
Main namespace for the project Original.
Definition algorithms.h:21
TYPE min(TYPE a, TYPE b)
Returns the smaller of two given values.
TYPE max(TYPE a, TYPE b)
Returns the larger of two given values.
coroutine::generator< INTEGER > rangesOf(INTEGER start, INTEGER end, INTEGER steps=1)
Generates a sequence of integers from start to end (exclusive) with a given steps.
TYPE abs(TYPE a)
Returns the absolute value of a given number.
constexpr l_floating PI
The mathematical constant PI (π).
Definition maths.h:40
constexpr l_floating E
The mathematical constant E (Euler's number).
Definition maths.h:31
floating pow(floating base, integer exp)
Returns the result of raising a base to an exponent.
Definition maths.h:200