Created
August 14, 2012 21:28
-
-
Save DoubleEqual/3353195 to your computer and use it in GitHub Desktop.
Struct for Integer type as CGPoint Struct
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
// | |
// DEIntegerPoint.h | |
// | |
// | |
// Created by Sergio on 18/07/12. | |
// Copyright (c) 2012 Doubleequal.com. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
struct DEIntegerPoint | |
{ | |
NSInteger x; | |
NSInteger y; | |
}; | |
CG_INLINE struct DEIntegerPoint | |
DEIntegerPointMake(NSInteger x, NSInteger y) | |
{ | |
struct DEIntegerPoint p; | |
p.x = x; | |
p.y = y; | |
return p; | |
} | |
CG_INLINE bool | |
__DEIntegerPointEqualToPoint(struct DEIntegerPoint point1, struct DEIntegerPoint point2) | |
{ | |
return point1.x == point2.x && point1.y == point2.y; | |
} | |
#define DEIntegerPointEqualToPoint __DEIntegerPointEqualToPoint | |
#define DEIntegerPointZero DEIntegerPointMake(0,0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment