{"size": 355, "ext": "js", "max_stars_repo_path": "lib/sequences/cubic.js", "max_stars_repo_name": "smallmultiples/south.im", "max_stars_repo_stars_event_min_datetime": "2015-01-03T04:04:54.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-25T20:03:13.000Z", "max_issues_repo_path": "lib/sequences/cubic.js", "max_issues_repo_name": "davgit/south.im", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/sequences/cubic.js", "max_forks_repo_name": "davgit/south.im", "max_forks_repo_forks_event_min_datetime": "2015-02-11T15:38:07.000Z", "max_forks_repo_forks_event_max_datetime": "2018-04-19T00:44:02.000Z"}
{"max_stars_count": 32, "max_issues_count": null, "max_forks_count": 5, "avg_line_length": 16.9047619048, "max_line_length": 54, "alphanum_fraction": 0.6028169014}
// @todo clarify licensing requirements for the
// cubic interpolation function.

module.exports = cubic

function cubic(t) {
  var t2 = t * t
  var t3 = t2 * t
  return 4 * (t < 0.5 ? t3 : 3 * (t - t2) + t3 - 0.75)
}

cubic['out'] = cubicOut
function cubicOut(t) {
  return ((--t)*t*t + 1)
}

cubic['in'] = cubicIn
function cubicIn(t) {
  return t*t*t
}
