-
Notifications
You must be signed in to change notification settings - Fork 0
/
geom.h
30 lines (18 loc) · 768 Bytes
/
geom.h
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
#ifndef GEOM_H
#define GEOM_H
#define M_PI 3.14159265358979323846
#include <math.h>
const int Inf = 1234567890;
double isEqual(double a, double b, double eps = 10e-6);
double NormAngle(double a);
double Pif2(double a, double b);
double Pif(double a, double b);
double ctg(double a);
double vectorMul(double x1, double y1, double x2, double y2);
double scalarMul(double x1, double y1, double x2, double y2);
double orientedS(double x1, double y1, double x2, double y2, double x3, double y3);
bool intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4,
double& x, double& y);
double height(double x, double y, double x1, double y1, double x2, double y2);
double sqr(double a);
#endif // GEOM_H