22#include <kiwano/core/Function.h>
23#include <kiwano/math/Vec2.hpp>
24#include <kiwano/math/Rect.hpp>
25#include <kiwano/math/Transform.hpp>
32template <
typename _Method =
void>
38 inline float operator()(
float frac)
const noexcept
47 float (*method)(float);
54 inline float operator()(
float frac)
const noexcept
72 inline float operator()(
float frac)
const noexcept
80template <
typename _Ty>
83template <
typename _Ty>
87 template <
typename _Method =
void>
92 return start +
static_cast<_Ty
>(
static_cast<float>(end - start) * method(frac));
96template <
typename _Ty>
100 template <
typename _Method =
void>
108 return Vec2T<_Ty>{ fi.Interpolate(start.x, end.x, frac, method), fi.Interpolate(start.y, end.y, frac, method) };
112template <
typename _Ty>
116 template <
typename _Method =
void>
124 return RectT<_Ty>{ vi.Interpolate(start.left_top, end.left_top, frac, method),
125 vi.Interpolate(start.right_bottom, end.right_bottom, frac, method) };
129template <
typename _Ty>
133 template <
typename _Method =
void>
146 transform.
scale = vi.Interpolate(start.
scale, end.
scale, frac, method);
147 transform.
skew = vi.Interpolate(start.
skew, end.
skew, frac, method);
Definition: Function.h:228
Definition: Interpolator.h:85
Definition: Interpolator.h:33