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

◆ quadraticInOut

detail::quadraticInOutEasing quadraticInOut {}
inlineconstexpr

Quadratic polynomial easing with gentle acceleration and deceleration.

The quadraticInOut easing function provides the most subtle polynomial S-curve. Perfect for animations that need easing but should remain understated.

Motion profile:

  • First half: Gentle acceleration (t²)
  • Midpoint: Maximum velocity
  • Second half: Gentle deceleration
  • Creates subtle S-curve

This easing is appropriate for:

  • Minimal design systems: Understated, refined motion
  • Fast animations: Under 200ms where gentle curves shine
  • Accessibility: Motion-sensitive users
  • Background motion: Animations that shouldn't dominate

Mathematically: Combines quadraticIn for t < 0.5 and quadraticOut for t >= 0.5

// Subtle menu transition
auto x = tweeny::from(0.0f)
.to(100.0f)
.during(20U)
.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 & via(EasingFunctionTypes... easing_functions)
Specifies per-component easing functions for the last keyframe segment.
Definition tweeny.h:198
constexpr detail::quadraticInOutEasing quadraticInOut
Quadratic polynomial easing with gentle acceleration and deceleration.
Definition easing.h:1069
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
quadraticIn For only gentle acceleration
quadraticOut For only gentle deceleration
cubicInOut For more pronounced motion
Visualize at https://easings.net/#easeInOutQuad