[6] | 1 | /* |
---|
| 2 | ----------------------------------------------------------------------------- |
---|
| 3 | This source file is part of LEXIExporter |
---|
| 4 | |
---|
| 5 | Copyright 2006 NDS Limited |
---|
| 6 | |
---|
| 7 | Author(s): |
---|
| 8 | Bo Krohn |
---|
| 9 | |
---|
| 10 | This program is free software; you can redistribute it and/or modify it under |
---|
| 11 | the terms of the GNU Lesser General Public License as published by the Free Software |
---|
| 12 | Foundation; either version 2 of the License, or (at your option) any later |
---|
| 13 | version. |
---|
| 14 | |
---|
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT |
---|
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
---|
| 18 | |
---|
| 19 | You should have received a copy of the GNU Lesser General Public License along with |
---|
| 20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
| 21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to |
---|
| 22 | http://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 | |
---|
| 53 | inline 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__ |
---|