Skip to content

Instantly share code, notes, and snippets.

@Air-Craft
Created April 7, 2015 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Air-Craft/f49834b4c2bb35c3d8bc to your computer and use it in GitHub Desktop.
Save Air-Craft/f49834b4c2bb35c3d8bc to your computer and use it in GitHub Desktop.
Float modulus block #objective-c #math
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