SaturnRingLibrary 0.9.1
SGL wrapper
 
Loading...
Searching...
No Matches

◆ ElasticEaseIn()

static constexpr Fxp SRL::Math::Interpolation::ElasticEaseIn ( const Fxp & start,
const Fxp & end,
const Fxp & t )
inlinestaticconstexpr

Elastic ease-in interpolation for spring-like motion.

Implements elastic easing with configurable period and amplitude. Uses quadratic approximation of sine for efficiency.

The easing produces this motion:

  • Multiple overshoots
  • Decreasing amplitude
  • Final snap to position

Common uses:

  • Menu bounces
  • Character stretching
  • Projectile charge-up
  • Spring animations
Parameters
startStarting value of the interpolation
endEnding value of the interpolation
tInterpolation factor in range [0,1]
Returns
Eased value
Note
Uses approximated sine to avoid trigonometric tables