25#ifndef TWEENY_INTERPOLATE_H
26#define TWEENY_INTERPOLATE_H
34namespace tweeny::detail {
35 template <std::size_t I,
typename... ValueTypes>
36 static auto interpolate_one(
40 ) -> std::remove_reference_t<decltype(std::get<I>(base.values))> {
41 const auto & start = std::get<I>(base.values);
42 const auto & end = std::get<I>(next.values);
43 const auto & func = std::get<I>(base.easing_functions);
44 if (func)
return func(t, start, end);
48 template <
typename... ValueTypes, std::size_t... I>
49 static auto interpolate_values(
53 std::index_sequence<I...>
54 ) ->
typename key_frame<ValueTypes...>::values_t {
55 using values_t =
typename key_frame<ValueTypes...>::values_t;
57 ((std::get<I>(out) = interpolate_one<I>(t, base, next)), ...);
constexpr detail::defaultEasing def
Default easing function, alias for linear easing.
Definition easing.h:569
Represents a key frame in a tween.
Definition key-frame.h:48