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 xDeclared In
EILPoint.h
y
Y coordinate of the point.
@property (nonatomic, assign, readonly) double yDeclared In
EILPoint.h
Creating and Initializing Points
Operations on point
– distanceToPoint:
Computes distance between given point and this point.
- (double)distanceToPoint:(EILPoint *)pointParameters
point |
Given point to which distance will be computed. |
|---|
Return Value
Distance between points.
Declared In
EILPoint.h
Serialization
– toDictionary
Serializes the point to NSDictionary.
- (NSDictionary *)toDictionaryReturn 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)otherParameters
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)hashDeclared In
EILPoint.h
Describing Objects
Encoding and Decoding
– initWithCoder:
Returns a point initialized from data in a given unarchiver.
- (nullable instancetype)initWithCoder:(NSCoder *)decoderParameters
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 *)coderParameters
An |
archiver object. |
|---|
Declared In
EILPoint.h