-
-
Save leilee/798839857cc79536805e423471d694a3 to your computer and use it in GitHub Desktop.
Create a hash from a CGRect
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
NSUInteger PSPDFHashFromCGRect(CGRect rect) { | |
return (*(NSUInteger *)&rect.origin.x << 10 ^ *(NSUInteger *)&rect.origin.y) + (*(NSUInteger *)&rect.size.width << 10 ^ *(NSUInteger *)&rect.size.height); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment