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

◆ circularIn

detail::circularInEasing circularIn {}
inlineconstexpr

Circular easing based on quarter-circle arc for smooth acceleration.

The circularIn easing function accelerates following the curve of a quarter circle, creating smooth, gradual acceleration. The motion follows the equation 1 - sqrt(1 - t²), which traces a circular arc.

Characteristics:

  • Smooth, continuous acceleration
  • More gradual than quadratic, less than cubic
  • No sharp transitions in velocity
  • Mathematically elegant curve

This easing is ideal for:

  • Natural motion: Movements that need organic feel
  • Camera movements: Smooth pans and zooms
  • Scroll animations: Gentle acceleration for reading comfort
  • Subtle UI transitions: Motion with moderate acceleration

Circular easings strike a balance between the gentle quadratic and the more aggressive cubic curves, making them versatile for many contexts.

// Smooth camera pan
auto cameraX = tweeny::from(0.0f)
.to(1000.0f)
.during(90U)
.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::circularInEasing circularIn
Circular easing based on quarter-circle arc for smooth acceleration.
Definition easing.h:337
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
circularOut For circular deceleration
circularInOut For circular acceleration and deceleration
quadraticIn For gentler acceleration
cubicIn For stronger acceleration
Visualize at https://easings.net/#easeInCirc