Tweeny 4.1.0
A Tweening library for modern C++
Loading...
Searching...
No Matches

◆ def

detail::defaultEasing def {}
inlineconstexpr

Default easing function, alias for linear easing.

The def easing is a convenience alias for linear, providing the same constant-velocity interpolation with no acceleration or deceleration. It exists as a semantic indicator that the default easing behavior is being explicitly chosen.

Using def instead of linear can make code intent clearer in contexts where you want to explicitly state "use the default behavior" rather than specifically requesting linear motion. However, both are functionally identical.

This is the easing applied when no via() call is made in the tween builder.

// These three tweens are functionally identical:
auto t1 = tweeny::from(0).to(100).during(60U).build(); // Implicit default
auto t2 = tweeny::from(0).to(100).via(easing::def).during(60U).build();
auto t3 = tweeny::from(0).to(100).via(easing::linear).during(60U).build();
tweeny_builder< true, FirstValue, RemainingValues... > to(const FirstValue &firstComponent, const RemainingValues &... remainingComponents) &
Adds a target keyframe to the tween.
Definition tweeny.h:109
tweeny_builder & during(FrameCountsType... frame_counts)
Specifies per-component frame durations for the last keyframe segment.
Definition tweeny.h:245
tweeny_builder & via(EasingFunctionTypes... easing_functions)
Specifies per-component easing functions for the last keyframe segment.
Definition tweeny.h:198
constexpr detail::defaultEasing def
Default easing function, alias for linear easing.
Definition easing.h:569
constexpr detail::linearEasing linear
Linear easing function with constant velocity throughout the animation.
Definition easing.h:956
tweeny_builder< false, FirstValue, RemainingValues... > from(FirstValue firstComponent, RemainingValues... remainingComponents)
Creates a new tween builder starting from the specified value(s).
Definition tweeny.h:347
See also
linear For the primary documentation of this easing behavior