StarTrekV3_Linux  Version3
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
CoolMath.h
Go to the documentation of this file.
1 //
2 // ___.--------._____________,------' -----.`----._
3 // \ ` - . _ /\
4 // `.__________ ` - | | __,---"-._
5 // `-----------.______ ,'_/ ________,------'___________`----.___________
6 // `-----.____,' \===========================================/
7 // | :| >--------------.----------.---------------'
8 // / :| _,--' ,--' `--.__.--'
9 // / : |--'______________/_
10 // ,---,' : \__________________`--.
11 // `__________ |/|
12 // `------._ |\|
13 // `--._________,-'
14 //
15 //
16 //
17 // Credits go to Paramount pictures for the star - trek concept and universe.
18 
19 
20 // Copyright (C) 2015 - 2016 E.J.M. Martens
21 //
22 // This program is free software; you can redistribute it and/or
23 // modify it under the terms of the GNU General Public License
24 // as published by the Free Software Foundation; either version 2
25 // of the License, or (at your option) any later version.
26 //
27 // This program is distributed in the hope that it will be useful,
28 // but WITHOUT ANY WARRANTY; without even the implied warranty of
29 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 // GNU General Public License for more details.
31 //
32 // You should have received a copy of the GNU General Public License
33 // along with this program; if not, write to the Free Software
34 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
35 
36 
37 #ifndef _COOL_MATH
38 #define _COOL_MATH
39 
40 #include <math.h>
41 
42 #define PI 3.14159265358
43 
44 
45 double Distance(double a_dX1,double a_dY1, double a_dX2,double a_dY2);
46 int Distance(int a_nX1,int a_nY1, int a_nX2,int a_nY2);
47 
48 bool PointInTriangle(int a_nPx, int a_nPy,
49  int a_nTriPo1x, int a_nTripo1y,
50  int a_nTriPo2x, int a_nTripo2y,
51  int a_nTriPo3x, int a_nTripo3y);
52 
53 
54 
55 
56 
57 #endif // _COOL_MATH
58 
double Distance(double a_dX1, double a_dY1, double a_dX2, double a_dY2)
Definition: CoolMath.cpp:4
bool PointInTriangle(int a_nPx, int a_nPy, int a_nTriPo1x, int a_nTripo1y, int a_nTriPo2x, int a_nTripo2y, int a_nTriPo3x, int a_nTripo3y)
Definition: CoolMath.cpp:23