src/tools/tMath.h File Reference

#include <math.h>

Include dependency graph for tMath.h:

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

Go to the source code of this file.

Functions

bool good (REAL f)
static bool clamp (REAL &c, REAL min, REAL max)


Function Documentation

static bool clamp ( REAL c,
REAL  min,
REAL  max 
) [inline, static]

Definition at line 49 of file tMath.h.

References tASSERT.

Referenced by gCycleMovement::ApplyAcceleration(), gCycleMovement::Timestep(), gCycleMovement::TimestepCore(), gCycle::TimestepCore(), and gFloatCompressor::Write().

00049                                                      {
00050     tASSERT(min <= max);
00051 
00052     if (!finite(c))
00053     {
00054         c = 0;
00055         return true;
00056     }
00057 
00058     if (c<min)
00059     {
00060         c = min;
00061         return true;
00062     }
00063 
00064     if (c>max)
00065     {
00066         c = max;
00067         return true;
00068     }
00069 
00070     return false;
00071 }

Here is the caller graph for this function:

bool good ( REAL  f  )  [inline]

Definition at line 44 of file tMath.h.

Referenced by gCycleMovement::ApplyAcceleration(), gCycleMovement::CalculateAcceleration(), eGrid::DrawLine(), gPlayerWall::GlobalToLocal(), gPlayerWall::LocalToGlobal(), main(), eGameObject::Move(), gNetPlayerWall::Pos(), gPlayerWall::Pos(), gNetPlayerWall::Time(), and gPlayerWall::Time().

00045 {
00046     return finite( f );
00047 }

Here is the caller graph for this function:


Generated on Sat Mar 15 23:12:05 2008 for Armagetron Advanced by  doxygen 1.5.4