1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef AGS_ENGINE_AC_MATH_H
24 #define AGS_ENGINE_AC_MATH_H
25 
26 #include "ags/shared/core/types.h"
27 
28 namespace AGS3 {
29 
30 enum RoundDirections {
31 	eRoundDown = 0,
32 	eRoundNearest = 1,
33 	eRoundUp = 2
34 };
35 
36 
37 int FloatToInt(float value, int roundDirection);
38 float IntToFloat(int value);
39 float StringToFloat(const char *theString);
40 float Math_Cos(float value);
41 float Math_Sin(float value);
42 float Math_Tan(float value);
43 float Math_ArcCos(float value);
44 float Math_ArcSin(float value);
45 float Math_ArcTan(float value);
46 float Math_ArcTan2(float yval, float xval);
47 float Math_Log(float value);
48 float Math_Log10(float value);
49 float Math_Exp(float value);
50 float Math_Cosh(float value);
51 float Math_Sinh(float value);
52 float Math_Tanh(float value);
53 float Math_RaiseToPower(float base, float exp);
54 float Math_DegreesToRadians(float value);
55 float Math_RadiansToDegrees(float value);
56 float Math_GetPi();
57 float Math_Sqrt(float value);
58 
59 int __Rand(int upto);
60 #define Random __Rand
61 
62 } // namespace AGS3
63 
64 #endif
65