sandbox
Loading...
Searching...
No Matches
algorithm.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
21#ifndef LIBSBX_MATH_ALGORITHM_HPP_
22#define LIBSBX_MATH_ALGORITHM_HPP_
23
24#include <cmath>
25#include <limits>
26
28
29namespace sbx::math {
30
46template<floating_point Type>
47inline constexpr auto mix(const Type x, const Type y, const Type a) -> Type;
48
60template<floating_point Type>
61inline constexpr auto abs(const Type value) -> Type;
62
76template<floating_point Type>
77inline constexpr auto sqrt(const Type value) -> Type;
78
79} // namespace sbx::math
80
81#include <libsbx/math/algorithm.ipp>
82
83#endif // LIBSBX_MATH_ALGORITHM_HPP_
constexpr auto abs(const Type value) -> Type
Computes the absolute value.
Definition: algorithm.ipp:12
constexpr auto mix(const Type x, const Type y, const Type a) -> Type
Linearly interpolates between two values.
Definition: algorithm.ipp:7
constexpr auto sqrt(const Type value) -> Type
Computes the square root using iterative refinement.
Definition: algorithm.ipp:17
Core numeric concepts and type traits.