Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

StdMaths.h File Reference

Wrapper for system math includes. More...

#include <math.h>
#include <float.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>

Include dependency graph for StdMaths.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define M_PI   ( 3.14159265358979323846264338327950288419716939937510)
#define M_2_PI   ( 2*M_PI)
#define M_HALF_PI   (M_PI/2)
#define DEGS_PER_RAD   (57.29577951308232286465)
#define RADS_PER_DEG   ( 0.01745329251994329547)
#define degs(x)   (x*DEGS_PER_RAD)
#define rads(x)   (x*RADS_PER_DEG)
#define acosf(x)   (float)(acos(x))
#define cosf(x)   (float)(cos(x))
#define sinf(x)   (float)(sin(x))
#define sqrtf(x)   (float)(sqrt(x))
#define isnan   __isnan
#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MAX(a, b)   ((a)>(b)?(a):(b))


Detailed Description

Wrapper for system math includes.

Definition in file StdMaths.h.


Define Documentation

#define acosf      (float)(acos(x))
 

Definition at line 141 of file StdMaths.h.

#define cosf      (float)(cos(x))
 

Definition at line 142 of file StdMaths.h.

Referenced by Teddy::Maths::Matrix::rotateX, Teddy::Maths::Matrix::rotateXMatrix, Teddy::Maths::Matrix::rotateY, Teddy::Maths::Matrix::rotateYMatrix, Teddy::Maths::Matrix::rotateZ, and Teddy::Maths::Matrix::rotateZMatrix.

#define degs      (x*DEGS_PER_RAD)
 

Definition at line 128 of file StdMaths.h.

#define DEGS_PER_RAD   (57.29577951308232286465)
 

Definition at line 126 of file StdMaths.h.

#define isnan   __isnan
 

Definition at line 150 of file StdMaths.h.

#define M_2_PI   ( 2*M_PI)
 

Definition at line 124 of file StdMaths.h.

Referenced by Teddy::Models::Capsule::Capsule, Teddy::Models::Cone::Cone, Teddy::Models::Geometry::makeCylindricalTextureCoordinates, Teddy::Models::Geometry::makeSphericalTextureCoordinates, Teddy::Models::Ring::Ring, Teddy::Models::Sphere::Sphere, and Teddy::Models::Torus::Torus.

#define M_HALF_PI   (M_PI/2)
 

Definition at line 125 of file StdMaths.h.

#define M_PI   ( 3.14159265358979323846264338327950288419716939937510)
 

Definition at line 123 of file StdMaths.h.

Referenced by Teddy::Models::Capsule::Capsule, Teddy::Scenes::Camera::getPerspectiveMatrix, Teddy::Models::Geometry::makeSphericalTextureCoordinates, and Teddy::Models::Sphere::Sphere.

#define MAX a,
     ((a)>(b)?(a):(b))
 

Definition at line 157 of file StdMaths.h.

Referenced by Teddy::PhysicalComponents::Dock::callSize, Teddy::Scenes::Scene::getMaxObDistance, Teddy::Scenes::Scene::getMaxObSize, Teddy::Maths::TRect< int >::intersect, Teddy::Maths::TRect< int >::intersection, and Teddy::Graphics::PsRenderer::spewPrimitiveEPS.

#define MIN a,
     ((a)<(b)?(a):(b))
 

Definition at line 154 of file StdMaths.h.

Referenced by Teddy::Maths::TRect< int >::intersect, Teddy::Maths::TRect< int >::intersection, Teddy::PhysicalComponents::Projection::materialPass, and Teddy::PhysicalComponents::Projection::materialReapplyActive.

#define rads      (x*RADS_PER_DEG)
 

Definition at line 129 of file StdMaths.h.

#define RADS_PER_DEG   ( 0.01745329251994329547)
 

Definition at line 127 of file StdMaths.h.

#define sinf      (float)(sin(x))
 

Definition at line 143 of file StdMaths.h.

Referenced by Teddy::Maths::Matrix::rotateX, Teddy::Maths::Matrix::rotateXMatrix, Teddy::Maths::Matrix::rotateY, Teddy::Maths::Matrix::rotateYMatrix, Teddy::Maths::Matrix::rotateZ, and Teddy::Maths::Matrix::rotateZMatrix.

#define sqrtf      (float)(sqrt(x))
 

Definition at line 144 of file StdMaths.h.