ScummVM API documentation
math.h
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 modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (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, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef AGS_ENGINE_AC_MATH_H
23#define AGS_ENGINE_AC_MATH_H
24
25#include "ags/shared/core/types.h"
26
27namespace AGS3 {
28
29enum RoundDirections {
30 eRoundDown = 0,
31 eRoundNearest = 1,
32 eRoundUp = 2
33};
34
35
36int FloatToInt(float value, int roundDirection);
37float IntToFloat(int value);
38float StringToFloat(const char *theString);
39float Math_Cos(float value);
40float Math_Sin(float value);
41float Math_Tan(float value);
42float Math_ArcCos(float value);
43float Math_ArcSin(float value);
44float Math_ArcTan(float value);
45float Math_ArcTan2(float yval, float xval);
46float Math_Log(float value);
47float Math_Log10(float value);
48float Math_Exp(float value);
49float Math_Cosh(float value);
50float Math_Sinh(float value);
51float Math_Tanh(float value);
52float Math_RaiseToPower(float base, float exp);
53float Math_DegreesToRadians(float value);
54float Math_RadiansToDegrees(float value);
55float Math_GetPi();
56float Math_Sqrt(float value);
57
58int __Rand(int upto);
59#define Random __Rand
60
61} // namespace AGS3
62
63#endif