objc

NXPoint.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include <stdbool.h>
11 #include <stdint.h>
12 
18 typedef struct NXPoint {
19  int32_t x;
20  int32_t y;
21 } NXPoint;
22 
32 static inline bool NXEqualsPoint(NXPoint a, NXPoint b) {
33  return (a.x == b.x) && (a.y == b.y);
34 }
35 
47 static inline NXPoint NXMakePoint(int32_t x, int32_t y) {
48  NXPoint p;
49  p.x = x;
50  p.y = y;
51  return p;
52 }
static bool NXEqualsPoint(NXPoint a, NXPoint b)
Compare two points for equality.
Definition: NXPoint.h:32
static NXPoint NXMakePoint(int32_t x, int32_t y)
Create an NXPoint from integer coordinates.
Definition: NXPoint.h:47
int32_t x
The X coordinate of the point.
Definition: NXPoint.h:19
struct NXPoint NXPoint
A structure representing a point in 2D space.
int32_t y
The Y coordinate of the point.
Definition: NXPoint.h:20
A structure representing a point in 2D space.
Definition: NXPoint.h:18