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
x
x coordinate
y
y coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;
Parameters
x
x coordinate
y
y coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZValue:(double)z;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
m
m coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZ:(NSDecimalNumber *)z andM:(NSDecimalNumber *)m;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
m
m coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithXValue:(double)x andYValue:(double)y andZValue:(double)z andMValue:(double)m;
Parameters
x
x coordinate
y
y coordinate
z
z coordinate
m
m coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;
Parameters
hasZ
has z coordinate
hasM
has m coordinate
x
x coordinate
y
y coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM andXValue:(double)x andYValue:(double)y;
Parameters
hasZ
has z coordinate
hasM
has m coordinate
x
x coordinate
y
y coordinate
Return Value
new point
-
Create
Declaration
Objective-C
+ (SFPoint *)pointWithPoint:(SFPoint *)point;
Parameters
point
point
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
x
x coordinate
y
y coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithX:(NSDecimalNumber *)x andY:(NSDecimalNumber *)y;
Swift
init!(x: NSDecimalNumber!, andY y: NSDecimalNumber!)
Parameters
x
x coordinate
y
y 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
x
x coordinate
y
y coordinate
z
z 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
x
x coordinate
y
y coordinate
z
z 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
x
x coordinate
y
y coordinate
z
z 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
x
x coordinate
y
y coordinate
z
z coordinate
m
m 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
x
x coordinate
y
y coordinate
z
z coordinate
m
m 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
x
x coordinate
y
y coordinate
z
z coordinate
m
m 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
hasZ
has z coordinate
hasM
has m coordinate
x
x coordinate
y
y 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
hasZ
has z coordinate
hasM
has m coordinate
x
x coordinate
y
y coordinate
Return Value
new point
-
Initialize
Declaration
Objective-C
- (instancetype)initWithPoint:(SFPoint *)point;
Swift
init!(point: SFPoint!)
Parameters
point
point
Return Value
new point
-
Get the x value
Declaration
Objective-C
- (double)xValue;
Swift
func xValue() -> Double
Return Value
x coordinate
-
Set the x value
Declaration
Objective-C
- (void)setXValue:(double)x;
Swift
func setXValue(_ x: Double)
Parameters
x
x coordinate
-
Get the y value
Declaration
Objective-C
- (double)yValue;
Swift
func yValue() -> Double
Return Value
y coordinate
-
Set the y value
Declaration
Objective-C
- (void)setYValue:(double)y;
Swift
func setYValue(_ y: Double)
Parameters
y
y coordinate
-
Get the z value
Declaration
Objective-C
- (double)zValue;
Swift
func zValue() -> Double
Return Value
z coordinate
-
Set the z value
Declaration
Objective-C
- (void)setZValue:(double)z;
Swift
func setZValue(_ z: Double)
Parameters
z
z coordinate
-
Get the m value
Declaration
Objective-C
- (double)mValue;
Swift
func mValue() -> Double
Return Value
m coordinate
-
Set the m value
Declaration
Objective-C
- (void)setMValue:(double)m;
Swift
func setMValue(_ m: Double)
Parameters
m
m coordinate
-
Indicates if x values are equal
Declaration
Objective-C
- (BOOL)isEqualXToPoint:(SFPoint *)point;
Swift
func isEqualX(to point: SFPoint!) -> Bool
Parameters
point
point 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!) -> Bool
Parameters
point
point 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!) -> Bool
Parameters
point
point to compare
Return Value
true if x and y are equal