My Project: dynamics.mod/NewtonDynamics/packages/dMath/dMathDefines.h File Reference

My Project

Macros | Typedefs | Enumerations | Functions
dMathDefines.h File Reference
`#include <math.h>`
`#include <float.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <assert.h>`

Go to the source code of this file.

## Macros

#define | dAbs(x) dFloat (fabs (dFloat(x)))
#define | dSqrt(x) dFloat (sqrt (dFloat(x)))
#define | dFloor(x) dFloat (floor (dFloat(x)))
#define | dCiel(x) dFloat (ceil (dFloat(x)))
#define | dMod(x, y) dFloat (fmod (dFloat(x), dFloat(y)))
#define | dPow(x, y) dFloat (pow (dFloat(x), dFloat(y)))
#define | dSin(x) dFloat (sin (dFloat(x)))
#define | dCos(x) dFloat (cos (dFloat(x)))
#define | dTan(x) dFloat (tan (dFloat(x)))
#define | dAsin(x) dFloat (asin (dFloat(x)))
#define | dAcos(x) dFloat (acos (dFloat(x)))
#define | dAtan2(x, y) dFloat (atan2 (dFloat(x), dFloat(y)))
#define | D_MSC_VECTOR_ALIGMENT
#define | dAssert(x) assert(x)
#define | dTrace(x)

## Typedefs

typedef float | dFloat
typedef double | dFloat64

## Enumerations

enum | dEulerAngleOrder { m_pitchYawRoll = (0 << 8) + (1 << 4) + (2 << 0), m_rollYawpitch = (2 << 8) + (1 << 4) + (0 << 0) }

## Functions

template<class T >
T | dSign (T A)
template<class T >
void | dSwap (T &A, T &B)
template<class T >
T | dMax (T A, T B)
template<class T >
T | dMin (T A, T B)
template<class T >
T | dClamp (T val, T min, T max)
template<class T >
void | dSort (T *const array, int elements, int(*compare)(const T *const A, const T *const B, void *const context), void *const context=NULL)

## Macro Definition Documentation

## § D_MSC_VECTOR_ALIGMENT

#define D_MSC_VECTOR_ALIGMENT

## § dAbs

#define dAbs | ( |  | x | ) | dFloat (fabs (dFloat(x)))

## § dAcos

#define dAcos | ( |  | x | ) | dFloat (acos (dFloat(x)))

## § dAsin

#define dAsin | ( |  | x | ) | dFloat (asin (dFloat(x)))

## § dAssert

#define dAssert | ( |  | x | ) | assert(x)

## § dAtan2

#define dAtan2 | ( |  | x,
|  |  | y
| ) |  | dFloat (atan2 (dFloat(x), dFloat(y)))

## § dCiel

#define dCiel | ( |  | x | ) | dFloat (ceil (dFloat(x)))

## § dCos

#define dCos | ( |  | x | ) | dFloat (cos (dFloat(x)))

## § dFloor

#define dFloor | ( |  | x | ) | dFloat (floor (dFloat(x)))

## § dMod

#define dMod | ( |  | x,
|  |  | y
| ) |  | dFloat (fmod (dFloat(x), dFloat(y)))

## § dPow

#define dPow | ( |  | x,
|  |  | y
| ) |  | dFloat (pow (dFloat(x), dFloat(y)))

## § dSin

#define dSin | ( |  | x | ) | dFloat (sin (dFloat(x)))

## § dSqrt

#define dSqrt | ( |  | x | ) | dFloat (sqrt (dFloat(x)))

## § dTan

#define dTan | ( |  | x | ) | dFloat (tan (dFloat(x)))

## § dTrace

#define dTrace | ( |  | x | ) |

## Typedef Documentation

## § dFloat

typedef float dFloat

## § dFloat64

typedef double dFloat64

## Enumeration Type Documentation

## § dEulerAngleOrder

enum dEulerAngleOrder

Enumerator
m_pitchYawRoll |
m_rollYawpitch |

## Function Documentation

## § dClamp()

template<class T >

T dClamp | ( | T | val,
|  | T | min,
|  | T | max
| ) |  |

## § dMax()

template<class T >

T dMax | ( | T | A,
|  | T | B
| ) |  |

## § dMin()

template<class T >

T dMin | ( | T | A,
|  | T | B
| ) |  |

## § dSign()

template<class T >

T dSign | ( | T | A | ) |

## § dSort()

template<class T >

void dSort | ( | T *const | array,
|  | int | elements,
|  | int(*)(const T *const A, const T *const B, void *const context) | compare,
|  | void *const | context = `NULL`
| ) |  |

## § dSwap()

template<class T >

void dSwap | ( | T & | A,
|  | T & | B
| ) |  |