00001 // Magic Software, Inc. 00002 // http://www.magic-software.com 00003 // Copyright (c) 2000, All Rights Reserved 00004 // 00005 // Source code from Magic Software is supplied under the terms of a license 00006 // agreement and may not be copied or disclosed except in accordance with the 00007 // terms of that agreement. The various license agreements may be found at 00008 // the Magic Software web site. This file is subject to the license 00009 // 00010 // FREE SOURCE CODE 00011 // http://www.magic-software.com/License.html/free.pdf 00012 00013 #ifndef MGCMATH_H 00014 #define MGCMATH_H 00015 00016 typedef double MgcReal; 00017 00018 00019 class MgcMath 00020 { 00021 public: 00022 static int IAbs (int iValue); 00023 static int ICeil (double fValue); 00024 static int IFloor (double fValue); 00025 static int ISign (int iValue); 00026 00027 static MgcReal Abs (MgcReal fValue); 00028 static MgcReal ACos (MgcReal fValue); 00029 static MgcReal ASin (MgcReal fValue); 00030 static MgcReal ATan (MgcReal fValue); 00031 static MgcReal ATan2 (MgcReal fY, MgcReal fX); 00032 static MgcReal Ceil (MgcReal fValue); 00033 static MgcReal Cos (MgcReal fValue); 00034 static MgcReal Exp (MgcReal fValue); 00035 static MgcReal Floor (MgcReal fValue); 00036 static MgcReal Log (MgcReal fValue); 00037 static MgcReal Pow (MgcReal kBase, MgcReal kExponent); 00038 static MgcReal Sign (MgcReal fValue); 00039 static MgcReal Sin (MgcReal fValue); 00040 static MgcReal Sqr (MgcReal fValue); 00041 static MgcReal Sqrt (MgcReal fValue); 00042 static MgcReal UnitRandom (); 00043 00044 static const MgcReal INFINITY; 00045 static const MgcReal mgcPI; 00046 static const MgcReal TWO_PI; 00047 static const MgcReal HALF_PI; 00048 }; 00049 00050 #endif