Created
April 7, 2015 15:54
-
-
Save Air-Craft/f49834b4c2bb35c3d8bc to your computer and use it in GitHub Desktop.
Float modulus block #objective-c #math
This file contains 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
CGFloat (^modulus)(CGFloat, CGFloat) = ^CGFloat(CGFloat dividend, CGFloat divisor) { | |
return dividend - floor(dividend / divisor) * divisor; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment