Skip to content

warrenm/AHEasing

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

AHEasing

A supplemental library of easing functions for C, C++, and Objective-C

The useful portion of this project consists of two parts:

  1. A stand-alone easing function library, implemented in C (easing.h/easing.c)
  2. CAAnimation category methods to more easily use easing in your Core Animation projects

Supported functions

The following types of easing functions are supported:

  • Linear
  • Quadratic
  • Cubic
  • Quartic
  • Quintic
  • Sine
  • Circular
  • Elastic
  • Bounce
  • Back

Each of these has corresponding ease-in, ease-out, and ease-in-out variants. Here's a handy cheat sheet that includes visualizations and animation demos for these functions.

The core easing functions are implemented as C functions that take a time parameter and return a progress parameter, which can subsequently be used to interpolate any quantity.

Goals

The design goals of AHEasing are:

  • To be as fast as conceivably possible while maintaining human readability
  • To be portable to any system with a C runtime
  • To elucidate the mathematical underpinnings of common easing functions

Inspiration

This work is a spiritual descendent (not to say derivative work) of works done by the following individuals:

About

A library of easing functions for C, C++, and Objective-C

Resources

License

Stars

Watchers

Forks

Packages

No packages published