Namespaces | Defines | Functions | Variables

C:/Active/libraries/cxutils/2.0/include/cxutils/math/cxmath.h File Reference

Includes header files and defines values for some math operations. More...

#include <math.h>
#include "vector3d.h"
#include "point3d.h"
#include "segment3d.h"
#include "matrix.h"
#include "quaternion.h"
#include "coordinates.h"

Go to the source code of this file.

Namespaces

namespace  CxUtils

Defines

#define CX_DEG2RAD(deg)   ((deg)*CxUtils::CX_PI_OVER_180)
 Convert degrees to radians.
#define CX_RAD2DEG(rad)   ((rad)*CxUtils::CX_180_OVER_PI)
 Convert radians to degrees.
#define CX_ISNAN(x)   ((x) != (x))
 Checks if the value is a number.
#define CX_FLOAT_EQUAL(left, right, thresh)   ( fabs( left - right ) < thresh )
 Compare floating point numbers.

Functions

double CxUtils::CxToRadians (const double deg)
 Converts from degrees to radians.
double CxUtils::CxToDegrees (const double rad)
 Converts from radians to degrees.

Variables

const double CxUtils::CX_PI = 3.14159265358979323846
 Value of PI.
const double CxUtils::CX_HALF_PI = 1.57079632679489661923
 PI divided by 2.0.
const double CxUtils::CX_FOURTH_PI = 0.785398163397448309615
 PI diviced by 4.0.
const double CxUtils::CX_PI_OVER_180 = 0.0174532925199432957692222
 PI divided by 180.0.
const double CxUtils::CX_180_OVER_PI = 57.295779513082320876846364
 180 dividied by PI.
const double CxUtils::CX_TWO_PI = 6.28318530717958647692
 PI * 2.
const double CxUtils::CX_EPSILON = .00000000000000000000001
 Small number to prevent divide by 0.
const double CxUtils::PI = 3.14159265358979323846
 Value of PI.
const double CxUtils::Epsilon = .00000000000000000000001
 Small number to prevent divide by 0.

Detailed Description

Includes header files and defines values for some math operations.


Author(s): Daniel Barber
Created: 1 May 2007
Copyright (c) 2009
Applied Cognition and Training in Immersive Virtual Environments
(ACTIVE) Laboratory
Institute for Simulation and Training (IST)
University of Central Florida (UCF)
All rights reserved.
Email: dbarber@ist.ucf.edu
Web: http://active.ist.ucf.edu

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the ACTIVE LAB, IST, UCF, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE ACTIVE LAB''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UCF BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file cxmath.h.


Define Documentation

#define CX_DEG2RAD (   deg )    ((deg)*CxUtils::CX_PI_OVER_180)

Convert degrees to radians.

Definition at line 52 of file cxmath.h.

#define CX_FLOAT_EQUAL (   left,
  right,
  thresh 
)    ( fabs( left - right ) < thresh )

Compare floating point numbers.

Definition at line 55 of file cxmath.h.

#define CX_ISNAN (   x )    ((x) != (x))

Checks if the value is a number.

Definition at line 54 of file cxmath.h.

#define CX_RAD2DEG (   rad )    ((rad)*CxUtils::CX_180_OVER_PI)

Convert radians to degrees.

Definition at line 53 of file cxmath.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines