SFPoint
Objective-C
@interface SFPoint : SFGeometry
Swift
class SFPoint : SFGeometry
A single location in space. Each point has an X and Y coordinate. A point MAY optionally also have a Z and/or an M value.
-
X coordinate
Declaration
Objective-C
@property (nonatomic, strong) NSDecimalNumber *x;Swift
var x: NSDecimalNumber! { get set } -
Y coordinate
Declaration
Objective-C
@property (nonatomic, strong) NSDecimalNumber *y;Swift
var y: NSDecimalNumber! { get set } -
Z coordinate
Declaration
Objective-C
@property (nonatomic, strong) NSDecimalNumber *z;Swift
var z: NSDecimalNumber! { get set } -
M coordinate
Declaration
Objective-C
@property (nonatomic, strong) NSDecimalNumber *m;Swift
var m: NSDecimalNumber! { get set } -
Create
Declaration
Objective-C
+ (SFPoint *)point;Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y;Parameters
xx coordinate
yy coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;Parameters
xx coordinate
yy coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z;Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z;Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZValue:(double)z;Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZValue:(double)z andMValue:(double)m;Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;Parameters
hasZhas z coordinate
hasMhas m coordinate
xx coordinate
yy coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andXValue:(double)x andYValue:(double)y;Parameters
hasZhas z coordinate
hasMhas m coordinate
xx coordinate
yy coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithPoint:(SFPoint *)point;Parameters
pointpoint
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)init;Swift
init!()Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithXValue:(double)x andYValue:(double)y;Swift
init!(xValue x: Double, andYValue y: Double)Parameters
xx coordinate
yy coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;Swift
init!(x: NSDecimalNumber!, andY y: NSDecimalNumber!)Parameters
xx coordinate
yy coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z;Swift
init!(x: NSDecimalNumber!, andY y: NSDecimalNumber!, andZ z: NSDecimalNumber!)Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z;Swift
init!(xValue x: Double, andYValue y: Double, andZ z: NSDecimalNumber!)Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithXValue:(double)x andYValue:(double)y andZValue:(double)z;Swift
init!(xValue x: Double, andYValue y: Double, andZValue z: Double)Parameters
xx coordinate
yy coordinate
zz coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;Swift
init!(x: NSDecimalNumber!, andY y: NSDecimalNumber!, andZ z: NSDecimalNumber!, andM m: NSDecimalNumber!)Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;Swift
init!(xValue x: Double, andYValue y: Double, andZ z: NSDecimalNumber!, andM m: NSDecimalNumber!)Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithXValue:(double)x andYValue:(double)y andZValue:(double)z andMValue:(double)m;Swift
init!(xValue x: Double, andYValue y: Double, andZValue z: Double, andMValue m: Double)Parameters
xx coordinate
yy coordinate
zz coordinate
mm coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;Swift
init!(hasZ: Bool, andHasM hasM: Bool, andX x: NSDecimalNumber!, andY y: NSDecimalNumber!)Parameters
hasZhas z coordinate
hasMhas m coordinate
xx coordinate
yy coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andXValue:(double)x andYValue:(double)y;Swift
init!(hasZ: Bool, andHasM hasM: Bool, andXValue x: Double, andYValue y: Double)Parameters
hasZhas z coordinate
hasMhas m coordinate
xx coordinate
yy coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithPoint:(SFPoint *)point;Swift
init!(point: SFPoint!)Parameters
pointpoint
Return Value
new point
-
Get the x value
Declaration
Objective-C
- (double)xValue;Swift
func xValue() -> DoubleReturn Value
x coordinate
-
Set the x value
Declaration
Objective-C
- (void)setXValue:(double)x;Swift
func setXValue(_ x: Double)Parameters
xx coordinate
-
Get the y value
Declaration
Objective-C
- (double)yValue;Swift
func yValue() -> DoubleReturn Value
y coordinate
-
Set the y value
Declaration
Objective-C
- (void)setYValue:(double)y;Swift
func setYValue(_ y: Double)Parameters
yy coordinate
-
Get the z value
Declaration
Objective-C
- (double)zValue;Swift
func zValue() -> DoubleReturn Value
z coordinate
-
Set the z value
Declaration
Objective-C
- (void)setZValue:(double)z;Swift
func setZValue(_ z: Double)Parameters
zz coordinate
-
Get the m value
Declaration
Objective-C
- (double)mValue;Swift
func mValue() -> DoubleReturn Value
m coordinate
-
Set the m value
Declaration
Objective-C
- (void)setMValue:(double)m;Swift
func setMValue(_ m: Double)Parameters
mm coordinate
-
Indicates if x values are equal
Declaration
Objective-C
- (BOOL)isEqualXToPoint:(SFPoint *)point;Swift
func isEqualX(to point: SFPoint!) -> BoolParameters
pointpoint to compare
Return Value
true if x is equal
-
Indicates if y values are equal
Declaration
Objective-C
- (BOOL)isEqualYToPoint:(SFPoint *)point;Swift
func isEqualY(to point: SFPoint!) -> BoolParameters
pointpoint to compare
Return Value
true if y is equal
-
Indicates if x and y values are equal
Declaration
Objective-C
- (BOOL)isEqualXYToPoint:(SFPoint *)point;Swift
func isEqualXY(to point: SFPoint!) -> BoolParameters
pointpoint to compare
Return Value
true if x and y are equal
View on GitHub
SFPoint Class Reference