|
template<typename T > |
fcppt::optional::object< T > | ceil_div (T const &_dividend, T const &_divisor) |
| Calculates dividend / divisor rounded towards infinity.
|
|
template<typename T > |
fcppt::optional::object< T > | ceil_div_signed (T const &_dividend, T const &_divisor) |
| Calculates dividend / divisor rounded towards infinity.
|
|
template<typename T > |
fcppt::optional::object< T > | clamp (T const &_value, T const &_vmin, T const &_vmax) |
| Clamps a value into a range.
|
|
template<typename T > |
T | deg_to_rad (T const _deg) |
| Transforms degrees into radians.
|
|
template<typename T > |
T | diff (T const &_a, T const &_b) |
| Calculates the absolute distance between a and b .
|
|
template<typename L , typename R > |
fcppt::optional::object< FCPPT_MATH_DETAIL_BINARY_TYPE(L,/, R)> | div (L const &_dividend, R const &_divisor) |
| Calculates dividend / divisor.
|
|
template<typename Type > |
Type | from_array (fcppt::math::to_array_type< Type > &&_value) |
| Constructs an object with static storage from an array rvalue.
|
|
template<typename Type > |
Type | from_array (fcppt::math::to_array_type< Type > const &_value) |
| Constructs an object with static storage from an array lvalue.
|
|
template<typename Type > |
Type | interval_distance (fcppt::tuple::object< Type, Type > _i1, fcppt::tuple::object< Type, Type > _i2) |
| Calculates the distance of two intervals.
|
|
template<typename T >
requires (std::is_unsigned_v<T>) |
constexpr bool | is_power_of_2 (T const x) noexcept |
| Checks if a number is a power of two.
|
|
template<typename T > |
bool | is_zero (T const &_value) |
| Compares a value against zero.
|
|
template<typename T > |
T | log2 (T const x) |
| Calculates for unsigned types (using a loop)
|
|
template<typename T > |
fcppt::optional::object< T > | mod (T const &_dividend, T const &_divisor) |
| Wraps the integral modulo operator and the floating point modulo functions.
|
|
template<typename T > |
T | next_power_of_2 (T const _value) |
| Calculates the next power of 2 for an unsigned value.
|
|
template<typename Result , typename Exponent >
requires (std::is_unsigned_v<Exponent>) |
constexpr Result | power_of_2 (Exponent const _exponent) |
| Calculates two to the power of n.
|
|
template<typename T > |
T | rad_to_deg (T const _rad) |
| Transforms radians into degrees.
|
|
template<typename Type > |
fcppt::math::to_array_type< Type > | to_array (Type const &_value) |
| Returns the array of an object with static storage.
|
|
Everything math-related goes in here.