-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPoint.cpp
49 lines (43 loc) · 918 Bytes
/
Point.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Created by Ryan.Zurrin001 on 12/16/2021.
//
#include "Point.h"
bool rez::sort2DLRTB(const Point2d& a, const Point2d& b)
{
if ((a[X_] < b[X_])
|| (a[X_] == b[X_]) && (a[Y_] < b[Y_]))
{
return true;
}
return false;
}
bool rez::sort3DTBLR(const Point3d& a, const Point3d& b)
{
if ((a[Y_] > b[Y_])
|| (a[Y_] == b[Y_]) && (a[X_] < b[X_]))
{
return true;
}
return false;
}
bool rez::sort2DTBLR(const Point2d& a, const Point2d& b)
{
if ((a[Y_] > b[Y_])
|| (a[Y_] == b[Y_]) && (a[X_] < b[X_]))
{
return true;
}
return false;
}
bool rez::sort2DbyX(const Point2d& a, const Point2d& b)
{
if (a[X_] < b[X_])
return true;
return false;
}
bool rez::sort2DbyY(const Point2d& a, const Point2d& b)
{
if (a[Y_] < b[Y_])
return true;
return false;
}