Bart Janssens / SVL
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Constants.h Source File

Constants.h

00001 /*
00002     File:       Constants.h
00003 
00004     Function:   Contains various constants for VL.
00005 
00006     Author:     Andrew Willmott
00007 
00008     Copyright:  (c) 1999-2001, Andrew Willmott
00009 */
00010 
00011 #ifndef __VLConstants__
00012 #define __VLConstants__
00013 
00014 #include <cmath>
00015 #include "Basics.h"
00016 
00017 
00018 // --- Mathematical constants -------------------------------------------------
00019 
00020 
00021 #ifdef M_PI
00022 const double          vl_pi = M_PI;
00023 const double          vl_halfPi = M_PI_2;
00024 #elif defined(_PI)
00025 const double          vl_pi = _PI;
00026 const double          vl_halfPi = vl_pi / 2.0;
00027 #else
00028 const double          vl_pi = 3.14159265358979323846;
00029 const double          vl_halfPi = vl_pi / 2.0;
00030 #endif
00031 
00032 #ifdef HUGE_VAL
00033 const double        vl_inf = HUGE_VAL;
00034 #endif
00035 
00036 enum    ZeroOrOne   { vl_zero = 0, vl_0 = 0, vl_one = 1, vl_I = 1, vl_1 = 1 };
00037 enum    Block       { vl_Z = 0, vl_B = 1, vl_block = 1 };
00038 enum    Axis        { vl_x, vl_y, vl_z, vl_w };
00039 typedef Axis        vl_axis;
00040 
00041 const UInt          VL_REF_FLAG = UInt(1) << (sizeof(UInt) * 8 - 1);
00042 const UInt          VL_REF_MASK = (~VL_REF_FLAG);
00043 
00044 #endif