4#ifndef TETL_CMATH_LERP_HPP
5#define TETL_CMATH_LERP_HPP
7#include <etl/_concepts/floating_point.hpp>
15template <floating_point Float>
16[[nodiscard]]
constexpr auto lerp(Float a, Float b, Float t)
noexcept -> Float
18 if ((a <= 0 && b >= 0) || (a >= 0 && b <= 0)) {
19 return t * b + (1 - t) * a;
26 auto const x = a + t * (b - a);
27 if ((t > 1) == (b > a)) {
constexpr auto lerp(Float a, Float b, Float t) noexcept -> Float
Computes a+t(b−a), i.e. the linear interpolation between a and b for the parameter t (or extrapolatio...
Definition lerp.hpp:16
Definition adjacent_find.hpp:9