Loading...
Searching...
No Matches

A point at the specified metrics coordinates. More...

#include <com/navigine/idl/objc/NCPoint.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithX:y:
 Default constructor for class NCPoint.
 

Class Methods

(nonnull instancetype) + pointWithX:y:
 Factory method for class NCPoint.
 

Properties

float x
 point's x coordinate in meters.
 
float y
 point's y coordinate in meters.
 

Detailed Description

A point at the specified metrics coordinates.

Swift code snippet:

// Create points with x, y coordinates
let point1 = Point(x: 10.0, y: 20.0)
let point2 = Point(x: 30.0, y: 40.0)
let point3 = Point(x: 50.0, y: 60.0)
print("Created points: P1(\‍(point1.x), \‍(point1.y)), P2(\‍(point2.x), \‍(point2.y)), P3(\‍(point3.x), \‍(point3.y))")

Objective C code snippet:

// Create points with x, y coordinates
NCPoint *point1 = [[NCPoint alloc] initWithX:10.0 y:20.0];
NCPoint *point2 = [[NCPoint alloc] initWithX:30.0 y:40.0];
NCPoint *point3 = [[NCPoint alloc] initWithX:50.0 y:60.0];
NSLog(@"Created points: P1(%.1f, %.1f), P2(%.1f, %.1f), P3(%.1f, %.1f)",
point1.x, point1.y, point2.x, point2.y, point3.x, point3.y);

Definition at line 24 of file NCPoint.h.

Method Documentation

◆ initWithX:y:

- (nonnull instancetype) initWithX: (float) x
y: (float) y 

Default constructor for class NCPoint.

◆ pointWithX:y:

+ (nonnull instancetype) pointWithX: (float) x
y: (float) y 

Factory method for class NCPoint.

Property Documentation

◆ x

- (float) x
readnonatomicassign

point's x coordinate in meters.

Swift code snippet:

// Get X coordinate
let x1 = point1.x
print("Point1 X coordinate: \‍(x1)")

Objective C code snippet:

// Get X coordinate
double x1 = point1.x;
NSLog(@"Point1 X coordinate: %.1f", x1);

Definition at line 50 of file NCPoint.h.

◆ y

- (float) y
readnonatomicassign

point's y coordinate in meters.

Swift code snippet:

// Get Y coordinate
let y1 = point1.y
print("Point1 Y coordinate: \‍(y1)")

Objective C code snippet:

// Get Y coordinate
double y1 = point1.y;
NSLog(@"Point1 Y coordinate: %.1f", y1);

Definition at line 64 of file NCPoint.h.


The documentation for this class was generated from the following file: