Created
May 27, 2014 22:13
-
-
Save mbcharbonneau/a055d9ab36015ea0e0aa to your computer and use it in GitHub Desktop.
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
- (BOOL)isEqual:(id)object; | |
{ | |
if ( object == self ) { | |
return YES; | |
} | |
if ( object == nil || ![object isKindOfClass:[self class]] ) { | |
return NO; | |
} | |
BOOL xEqual = fabs( self.x - [object x] ) < .00001; | |
BOOL yEqual = fabs( self.y - [object y] ) < .00001; | |
return ( xEqual && yEqual ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment