Last active
December 11, 2015 07:08
-
-
Save mbigatti/4564354 to your computer and use it in GitHub Desktop.
iOS6 Rubber-banding Formula, as described by Grant Paul (chpwn) (ref. https://twitter.com/chpwn/status/285540192096497664)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BMXRubberBanding.h | |
// Rubber-banding Formula, as described by Grant Paul (chpwn) | |
// https://twitter.com/chpwn/status/285540192096497664 | |
// | |
#ifndef TimerApp_BMXRubberBanding_h | |
#define TimerApp_BMXRubberBanding_h | |
#define BMX_RUBBER_BANDING_CONSTANT 0.55 | |
#define BMX_RUBBER_BANDING(x,d) ((1.0 - (1.0 / (((x) * BMX_RUBBER_BANDING_CONSTANT / (d)) + 1.0))) * d) | |
#define BMX_RUBBER_BANDINGC(x,d,c) ((1.0 - (1.0 / (((x) * (c) / (d)) + 1.0))) * d) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment