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

◆ sinusoidalIn

detail::sinusoidalInEasing sinusoidalIn {}
inlineconstexpr

Sinusoidal easing based on sine wave for smooth acceleration.

The sinusoidalIn easing function uses a sine curve for acceleration, creating extremely smooth, natural motion. Based on trigonometric functions rather than polynomials.

Characteristics:

  • Very smooth acceleration
  • Natural, organic feel
  • No abrupt velocity changes
  • Gentle but noticeable

This easing is ideal for:

  • Natural motion: Organic, flowing animations
  • Smooth camera moves: Pans, zooms, orbits
  • Elegant transitions: Refined, sophisticated feel
  • Accessible animations: Gentle on motion sensitivity

Mathematically: f(t) = 1 - cos(t * π/2)

// Smooth camera pan
auto x = tweeny::from(0.0f)
.to(1000.0f)
.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 & via(EasingFunctionTypes... easing_functions)
Specifies per-component easing functions for the last keyframe segment.
Definition tweeny.h:198
constexpr detail::sinusoidalInEasing sinusoidalIn
Sinusoidal easing based on sine wave for smooth acceleration.
Definition easing.h:1335
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
sinusoidalOut For smooth deceleration
sinusoidalInOut For smooth motion at both ends
quadraticIn For similar gentleness
Visualize at https://easings.net/#easeInSine