1
1
forked from 0ad/0ad
0ad/source/terrain/MathUtil.h
notpete a60cafe1d4 RADTODEG macro added.
This was SVN commit r98.
2003-11-25 18:36:17 +00:00

28 lines
721 B
C
Executable File

//***********************************************************
//
// Name: MathUtil.H
// Last Update: 28/1/02
// Author: Poya Manouchehri
//
// Description: This file contains some maths related
// utility macros and fucntions.
//
//***********************************************************
#ifndef MATHUTIL_H
#define MATHUTIL_H
#define PI 3.14159265358979323846f
#define DEGTORAD(a) ((a) * (PI/180.0f))
#define RADTODEG(a) ((a) * (180.0f/PI))
#define SQR(x) ((x) * (x))
#define MAX(a,b) ((a < b) ? (b) : (a))
#define MIN(a,b) ((a < b) ? (a) : (b))
#define MAX3(a,b,c) ( MAX (MAX(a,b), c) )
#define ABS(a) ((a > 0) ? (a) : (-a))
//extern unsigned int F2DW (float f);
#endif