37template<
typename InType,
typename OutType>
39 const decltype(in)& in_start,
40 const decltype(in)& in_end,
41 const OutType& out_start,
42 const decltype(out_start)& out_end,
54auto clamp(
const T& value,
const T& min,
const T& max) -> T
56 return std::min<T>(std::max<T>(value, min), max);
65auto square(
float x,
int n) -> float;
72auto flip(
float x) -> float;
82auto mix(
float a,
float b,
float weight,
float t) -> float;
99auto scale(
float a,
float t) -> float;
114auto arch(
float t) -> float;
float linear(float progress)
Provides a sequence-based action management system for controlling and scheduling actions.
auto mix(float a, float b, float weight, float t) -> float
Mixes two values based on a weighted progress factor.
auto flip(float x) -> float
Flips a normalized value (1.0 becomes 0.0, 0.0 becomes 1.0).
auto start(seq_action action, const seq_scope_policy &scope_policy, hpp::source_location location) -> seq_id_t
Starts a new action.
std::function< float(float)> ease_t
Represents an easing function for interpolation.
auto crossfade(float a, float b, float t) -> float
Creates a crossfade effect between two values based on progress.
auto lerp(const T &start, const T &end, float progress, const ease_t &ease_func=ease::linear) -> T
Linearly interpolates between two values based on progress.
auto reverse_scale(float a, float t) -> float
Scales a value in reverse by a factor.
auto clamp(const T &value, const T &min, const T &max) -> T
Clamps a value to lie between a minimum and maximum.
auto arch(float t) -> float
Computes an arch effect (parabolic curve) based on progress.
auto square(float x, int n) -> float
Computes the square of a number raised to a power.
auto range_map(const InType &in, const decltype(in)&in_start, const decltype(in)&in_end, const OutType &out_start, const decltype(out_start)&out_end, const ease_t &ease_func=ease::linear) -> OutType
Maps a value from one range to another range, with optional easing.