Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/Tools/3dsmaxExport/LEXIExporter/SharedUtilities/Sources/MathDefines.h @ 6

Last change on this file since 6 was 6, checked in by anonymous, 17 years ago

=…

File size: 1.6 KB
RevLine 
[6]1/*
2-----------------------------------------------------------------------------
3This source file is part of LEXIExporter
4
5Copyright 2006 NDS Limited
6
7Author(s):
8Bo Krohn
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25
26/////////////////////////////////////////////////////
27//
28//  Math Defines
29//
30/////////////////////////////////////////////////////
31
32#ifndef __Math_Defines__
33#define __Math_Defines__
34
35//
36
37#define TV_PI                                   (3.1415926535897932384626433832795f)
38#define TV_HalfPI                               (TV_PI * 0.5f)
39#define TV_PI2                                  (TV_PI * 2.0f)
40
41#define UtilDegToRad(angle)             (0.017453293f * angle)
42#define UtilRadToDeg(angle)             (57.295779513f * angle)
43
44#define F_Min                                   FLT_MIN
45#define F_Max                                   FLT_MAX
46
47#define F_MinValue                              (0.0000005f)
48
49#define F_Square(v)                             ((v) * (v))
50
51//
52
53inline void sincos(const float& angle, float& s, float& c)
54{
55        s = sinf(angle);
56        c = cosf(angle);
57}
58
59//
60
61#endif // __Math_Defines__
Note: See TracBrowser for help on using the repository browser.