-
-
Save pxpgraphics/3bee670bb7108e8ce79e5440b77e11bb 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