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

◆ circularInOut

detail::circularInOutEasing circularInOut {}
inlineconstexpr

Circular easing with smooth acceleration and deceleration.

The circularInOut easing function uses circular curves for both acceleration and deceleration, creating balanced motion suitable for general UI work. This is a popular all-purpose easing.

Motion profile:

  • First half: Circular acceleration
  • Midpoint: Maximum velocity
  • Second half: Circular deceleration
  • Creates smooth S-curve

This easing is appropriate for:

  • All-purpose UI animations: Buttons, dialogs, drawers
  • Material Design: Recommended in Google's motion guidelines
  • Business applications: Productivity tools, enterprise apps
  • Default animation choice: Safe, versatile motion curve

CircularInOut is often recommended as a starting point for animations because it provides polish without being too subtle or too dramatic.

// Modal dialog appearance
auto opacity = tweeny::from(0.0f)
.to(1.0f)
.during(25U)
.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::circularInOutEasing circularInOut
Circular easing with smooth acceleration and deceleration.
Definition easing.h:416
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
circularIn For only acceleration
circularOut For only deceleration
quadraticInOut For gentler motion
cubicInOut For more dramatic motion
Visualize at https://easings.net/#easeInOutCirc