25#ifndef TWEENY_DETAIL_EASING_CIRCULAR_H
26#define TWEENY_DETAIL_EASING_CIRCULAR_H
30namespace tweeny::detail {
31 struct circularInEasing {
33 static T run(
const float position, T start, T end) {
34 return static_cast<T
>(-(end - start) * (sqrtf(1 - position * position) - 1) + start);
38 T operator()(
const float position, T start, T end)
const {
39 return run<T>(position, start, end);
43 struct circularOutEasing {
45 static T run(
float position, T start, T end) {
47 return static_cast<T
>((end - start) * sqrtf(1 - position * position) + start);
51 T operator()(
const float position, T start, T end)
const {
52 return run<T>(position, start, end);
56 struct circularInOutEasing {
58 static T run(
float position, T start, T end) {
61 return static_cast<T
>(-(end - start) / 2 * (sqrtf(1 - position * position) - 1) + start);
65 return static_cast<T
>((end - start) / 2 * (sqrtf(1 - position * position) + 1) + start);
69 T operator()(
float position, T start, T end)
const {
70 return run<T>(position, start, end);