Skip to content

Instantly share code, notes, and snippets.

@IanLunn
Created January 29, 2013 18:41
Show Gist options
  • Select an option

  • Save IanLunn/4666512 to your computer and use it in GitHub Desktop.

Select an option

Save IanLunn/4666512 to your computer and use it in GitHub Desktop.

Revisions

  1. IanLunn created this gist Jan 29, 2013.
    17 changes: 17 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    /* sample cubic beziers */
    linear = [0.250, 0.250, 0.750, 0.750];
    ease = [0.250, 0.100, 0.250, 1.000];
    easeIn = [0.420, 0.000, 1.000, 1.000];
    easeOut = [0.000, 0.000, 0.580, 1.000];
    easeInOut = [0.420, 0.000, 0.580, 1.000];

    function reverseCubicBezier(cubicBezier) {
    return [
    1 - cubicBezier[2],
    1 - cubicBezier[3],
    1 - cubicBezier[0],
    1 - cubicBezier[1]
    ];
    }

    console.log(reverseCubicBezier(linear));