EILPoint Class Reference
Inherits from | NSObject |
---|---|
Conforms to | NSCoding NSCopying |
Declared in | EILPoint.h EILPoint.m |
Properties
x
X coordinate of the point.
@property (nonatomic, assign, readonly) double x
Declared In
EILPoint.h
y
Y coordinate of the point.
@property (nonatomic, assign, readonly) double y
Declared In
EILPoint.h
Creating and Initializing Points
Operations on point
– distanceToPoint:
Computes distance between given point and this point.
- (double)distanceToPoint:(EILPoint *)point
Parameters
point |
Given point to which distance will be computed. |
---|
Return Value
Distance between points.
Declared In
EILPoint.h
Serialization
– toDictionary
Serializes the point to NSDictionar
y.
- (NSDictionary *)toDictionary
Return Value
A point representation in NSDictionary.
Declared In
EILPoint.h
Identifying and Comparing Objects
– isEqual:
Returns a boolean value that indicates whether given point is equal to this one.
- (BOOL)isEqual:(nullable id)other
Parameters
other |
The object to be compared to this point. May be nil. |
---|
Return Value
YES if points are equal, otherwise NO.
Declared In
EILPoint.h
– hash
Returns an integer that can be used as a table address in a hash table structure.
- (NSUInteger)hash
Declared In
EILPoint.h
Describing Objects
Encoding and Decoding
– initWithCoder:
Returns a point initialized from data in a given unarchiver.
- (nullable instancetype)initWithCoder:(NSCoder *)decoder
Parameters
decoder |
An unarchiver object. |
---|
Return Value
A new point initialized using the data in decoder.
Declared In
EILPoint.h
– encodeWithCoder:
Encodes the point using a given archiver.
- (void)encodeWithCoder:(NSCoder *)coder
Parameters
An |
archiver object. |
---|
Declared In
EILPoint.h