utils.h File Reference

#include <stdlib.h>
#include <boost/date_time/posix_time/posix_time.hpp>

Go to the source code of this file.

Functions

float clamp (float value, float lower, float upper)
float makeAnglePosNeg (float angle)
float differenceBetweenAngles (float angle1, float angle2)
float feet (float x)
float meters (float x)
float knots (float x)
float feetPerSecondSquared (float x)
float degreesPerSecond (float x)
float tons (float x)
float pounds (float x)
int randInt (int low, int high)
ptime getCurrentTime ()

Variables

const float pi = 3.14159
const float twopi = 2.0 * pi


Function Documentation

float clamp ( float  value,
float  lower,
float  upper 
) [inline]

Definition at line 16 of file utils.h.

Referenced by FastEcslent::Physics2D2::doHelmsman(), and FastEcslent::Physics2D1::doHelmsman().

float degreesPerSecond ( float  x  )  [inline]

Definition at line 53 of file utils.h.

Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().

float differenceBetweenAngles ( float  angle1,
float  angle2 
) [inline]

Definition at line 35 of file utils.h.

References makeAnglePosNeg().

Referenced by FastEcslent::Physics2D1::doHelmsman().

float feet ( float  x  )  [inline]

Definition at line 39 of file utils.h.

Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Refinery::Refinery(), FastEcslent::SupplyDepot::SupplyDepot(), and FastEcslent::Tank::Tank().

float feetPerSecondSquared ( float  x  )  [inline]

Definition at line 49 of file utils.h.

Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().

ptime getCurrentTime (  )  [inline]

Definition at line 71 of file utils.h.

Referenced by FastEcslent::MilliSecondTimer::hasFired(), FastEcslent::NetThread::init(), FastEcslent::MilliSecondTimer::MilliSecondTimer(), FastEcslent::Engine::run(), FastEcslent::NetThread::sendInfo(), and FastEcslent::NetThread::serve().

float knots ( float  x  )  [inline]

Definition at line 46 of file utils.h.

Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::Reaper::Reaper(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().

float makeAnglePosNeg ( float  angle  )  [inline]

Definition at line 24 of file utils.h.

References pi, and twopi.

Referenced by differenceBetweenAngles().

float meters ( float  x  )  [inline]

Definition at line 42 of file utils.h.

Referenced by FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Marine::Marine(), FastEcslent::Minerals::Minerals(), FastEcslent::SCVehicle::SCVehicle(), and FastEcslent::Thor::Thor().

float pounds ( float  x  )  [inline]

Definition at line 60 of file utils.h.

Referenced by FastEcslent::Marine::Marine(), and FastEcslent::Reaper::Reaper().

int randInt ( int  low,
int  high 
) [inline]

Definition at line 64 of file utils.h.

Referenced by FastEcslent::Tactic::changeLeadership().

float tons ( float  x  )  [inline]

Definition at line 57 of file utils.h.

Referenced by FastEcslent::Armory::Armory(), FastEcslent::Barracks::Barracks(), FastEcslent::CommandCenter::CommandCenter(), FastEcslent::EngineeringBay::EngineeringBay(), FastEcslent::Factory::Factory(), FastEcslent::Gas::Gas(), FastEcslent::Helion::Helion(), FastEcslent::Marauder::Marauder(), FastEcslent::Minerals::Minerals(), FastEcslent::Refinery::Refinery(), FastEcslent::SCVehicle::SCVehicle(), FastEcslent::SupplyDepot::SupplyDepot(), FastEcslent::Tank::Tank(), and FastEcslent::Thor::Thor().


Variable Documentation

const float pi = 3.14159

Definition at line 13 of file utils.h.

Referenced by makeAnglePosNeg().

const float twopi = 2.0 * pi

Definition at line 14 of file utils.h.

Referenced by makeAnglePosNeg().


Generated on Thu Sep 26 13:12:00 2013 for FastECSLent by  doxygen 1.5.4