/Interpolatr

A Light weight C# .net standard Tweening and Interpolation library

Primary LanguageC#MIT LicenseMIT

Interpolatr

a lightweight cross platform .net tweening & Interpolation library.

NuGet package:

NuGet Codacy Badge last commit

User Guide

Code Example

double startValue = 0;
double endValue = 10;
int stepCount = 5;

IEnumerable<Double> result = DoubleInterpolator.Interpolate(stepCount, DefaultEasers.Linear, startValue, endValue);

//Expected output { 2, 4, 6, 8, 10 }

Easers

Easer functions are used to determine the rate at which a transformations value changes. The graphs below show the rate at which an interpolator affected by each easer approaches its end value over time.

Easer demos

Linear

Alt Text

EaseIn

Alt Text

EaseOut

Alt Text

EaseInOut

Alt Text

Elastic

Alt Text