Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
WWMath Class Reference

#include <wwmath.h>

Static Public Member Functions

static void Init (void)
 
static void Shutdown (void)
 
static WWINLINE float Fabs (float val)
 
static WWINLINE int Float_To_Int_Chop (const float &f)
 
static WWINLINE int Float_To_Int_Floor (const float &f)
 
static float Cos (float val)
 
static float Sin (float val)
 
static float Sqrt (float val)
 
static float Inv_Sqrt (float a)
 
static long Float_To_Long (float f)
 
static WWINLINE float Fast_Sin (float val)
 
static WWINLINE float Fast_Inv_Sin (float val)
 
static WWINLINE float Fast_Cos (float val)
 
static WWINLINE float Fast_Inv_Cos (float val)
 
static WWINLINE float Fast_Acos (float val)
 
static WWINLINE float Acos (float val)
 
static WWINLINE float Fast_Asin (float val)
 
static WWINLINE float Asin (float val)
 
static float Atan (float x)
 
static float Atan2 (float y, float x)
 
static float Sign (float val)
 
static float Ceil (float val)
 
static float Floor (float val)
 
static bool Fast_Is_Float_Positive (const float &val)
 
static bool Is_Power_Of_2 (const unsigned int val)
 
static float Random_Float (void)
 
static float Random_Float (float min, float max)
 
static float Clamp (float val, float min=0.0f, float max=1.0f)
 
static double Clamp (double val, double min=0.0f, double max=1.0f)
 
static int Clamp_Int (int val, int min_val, int max_val)
 
static float Wrap (float val, float min=0.0f, float max=1.0f)
 
static double Wrap (double val, double min=0.0f, double max=1.0f)
 
static float Min (float a, float b)
 
static float Max (float a, float b)
 
static int Float_As_Int (const float f)
 
static float Lerp (float a, float b, float lerp)
 
static double Lerp (double a, double b, float lerp)
 
static long Float_To_Long (double f)
 
static unsigned char Unit_Float_To_Byte (float f)
 
static float Byte_To_Unit_Float (unsigned char byte)
 
static bool Is_Valid_Float (float x)
 
static bool Is_Valid_Double (double x)
 
static float Fabs (float val)
 
static float Sqrt (float val)
 
static float Inv_Sqrt (float val)
 
static float Sign (float val)
 
static float Floor (float val)
 
static bool Fast_Is_Float_Positive (const float &val)
 
static float Random_Float (void)
 
static float Random_Float (float min, float max)
 
static float Clamp (float val, float min=0.0f, float max=1.0f)
 
static double Clamp (double val, double min=0.0f, double max=1.0f)
 
static float Wrap (float val, float min=0.0f, float max=1.0f)
 
static double Wrap (double val, double min=0.0f, double max=1.0f)
 
static float Min (float a, float b)
 
static float Max (float a, float b)
 
static float Lerp (float a, float b, float lerp)
 
static double Lerp (double a, double b, float lerp)
 
static long Float_To_Long (float f)
 
static long Float_To_Long (double f)
 
static unsigned char Unit_Float_To_Byte (float f)
 
static float Byte_To_Unit_Float (unsigned char byte)
 
static bool Is_Valid_Float (float x)
 
static bool Is_Valid_Double (double x)
 

Detailed Description

Definition at line 103 of file wwmath.h.

Member Function Documentation

◆ Acos()

WWINLINE float WWMath::Acos ( float val)
static

Definition at line 510 of file wwmath.h.

◆ Asin()

WWINLINE float WWMath::Asin ( float val)
static

Definition at line 547 of file wwmath.h.

◆ Atan()

static float WWMath::Atan ( float x)
inlinestatic

Definition at line 149 of file wwmath.h.

◆ Atan2()

static float WWMath::Atan2 ( float y,
float x )
inlinestatic

Definition at line 150 of file wwmath.h.

◆ Byte_To_Unit_Float() [1/2]

static float WWMath::Byte_To_Unit_Float ( unsigned char byte)
inlinestatic

Definition at line 175 of file wwmath.h.

◆ Byte_To_Unit_Float() [2/2]

static float WWMath::Byte_To_Unit_Float ( unsigned char byte)
inlinestatic

Definition at line 115 of file wwmath.h.

◆ Ceil()

static float WWMath::Ceil ( float val)
inlinestatic

Definition at line 152 of file wwmath.h.

◆ Clamp() [1/4]

double WWMath::Clamp ( double val,
double min = 0.0f,
double max = 1.0f )
inlinestatic

Definition at line 215 of file wwmath.h.

◆ Clamp() [2/4]

static double WWMath::Clamp ( double val,
double min = 0.0f,
double max = 1.0f )
static

◆ Clamp() [3/4]

float WWMath::Clamp ( float val,
float min = 0.0f,
float max = 1.0f )
inlinestatic

Definition at line 208 of file wwmath.h.

◆ Clamp() [4/4]

static float WWMath::Clamp ( float val,
float min = 0.0f,
float max = 1.0f )
static

◆ Clamp_Int()

WWINLINE int WWMath::Clamp_Int ( int val,
int min_val,
int max_val )
static

Definition at line 222 of file wwmath.h.

◆ Cos()

WWINLINE float WWMath::Cos ( float val)
static

Definition at line 356 of file wwmath.h.

◆ Fabs() [1/2]

static WWINLINE float WWMath::Fabs ( float val)
inlinestatic

Definition at line 113 of file wwmath.h.

◆ Fabs() [2/2]

static float WWMath::Fabs ( float val)
inlinestatic

Definition at line 92 of file wwmath.h.

◆ Fast_Acos()

WWINLINE float WWMath::Fast_Acos ( float val)
static

Definition at line 482 of file wwmath.h.

◆ Fast_Asin()

WWINLINE float WWMath::Fast_Asin ( float val)
static

Definition at line 519 of file wwmath.h.

◆ Fast_Cos()

WWINLINE float WWMath::Fast_Cos ( float val)
static

Definition at line 435 of file wwmath.h.

◆ Fast_Inv_Cos()

WWINLINE float WWMath::Fast_Inv_Cos ( float val)
static

Definition at line 454 of file wwmath.h.

◆ Fast_Inv_Sin()

WWINLINE float WWMath::Fast_Inv_Sin ( float val)
static

Definition at line 406 of file wwmath.h.

◆ Fast_Is_Float_Positive() [1/2]

bool WWMath::Fast_Is_Float_Positive ( const float & val)
inlinestatic

Definition at line 193 of file wwmath.h.

◆ Fast_Is_Float_Positive() [2/2]

static bool WWMath::Fast_Is_Float_Positive ( const float & val)
static

◆ Fast_Sin()

WWINLINE float WWMath::Fast_Sin ( float val)
static

Definition at line 388 of file wwmath.h.

◆ Float_As_Int()

static int WWMath::Float_As_Int ( const float f)
inlinestatic

Definition at line 167 of file wwmath.h.

◆ Float_To_Int_Chop()

WWINLINE int WWMath::Float_To_Int_Chop ( const float & f)
static

Definition at line 574 of file wwmath.h.

◆ Float_To_Int_Floor()

WWINLINE int WWMath::Float_To_Int_Floor ( const float & f)
static

Definition at line 584 of file wwmath.h.

◆ Float_To_Long() [1/4]

long WWMath::Float_To_Long ( double f)
inlinestatic

Definition at line 328 of file wwmath.h.

◆ Float_To_Long() [2/4]

static long WWMath::Float_To_Long ( double f)
static

◆ Float_To_Long() [3/4]

long WWMath::Float_To_Long ( float f)
inlinestatic

Definition at line 322 of file wwmath.h.

◆ Float_To_Long() [4/4]

static long WWMath::Float_To_Long ( float f)
static

◆ Floor() [1/2]

static float WWMath::Floor ( float val)
inlinestatic

Definition at line 153 of file wwmath.h.

◆ Floor() [2/2]

static float WWMath::Floor ( float val)
inlinestatic

Definition at line 96 of file wwmath.h.

◆ Init()

void WWMath::Init ( void )
static

Definition at line 51 of file wwmath.cpp.

◆ Inv_Sqrt() [1/2]

WWINLINE float WWMath::Inv_Sqrt ( float a)
static

Definition at line 651 of file wwmath.h.

◆ Inv_Sqrt() [2/2]

static float WWMath::Inv_Sqrt ( float val)
inlinestatic

Definition at line 94 of file wwmath.h.

◆ Is_Power_Of_2()

WWINLINE bool WWMath::Is_Power_Of_2 ( const unsigned int val)
static

Definition at line 198 of file wwmath.h.

◆ Is_Valid_Double() [1/2]

bool WWMath::Is_Valid_Double ( double x)
inlinestatic

Definition at line 293 of file wwmath.h.

◆ Is_Valid_Double() [2/2]

static bool WWMath::Is_Valid_Double ( double x)
static

◆ Is_Valid_Float() [1/2]

bool WWMath::Is_Valid_Float ( float x)
inlinestatic

Definition at line 281 of file wwmath.h.

◆ Is_Valid_Float() [2/2]

static bool WWMath::Is_Valid_Float ( float x)
static

◆ Lerp() [1/4]

double WWMath::Lerp ( double a,
double b,
float lerp )
inlinestatic

Definition at line 275 of file wwmath.h.

◆ Lerp() [2/4]

static double WWMath::Lerp ( double a,
double b,
float lerp )
static

◆ Lerp() [3/4]

float WWMath::Lerp ( float a,
float b,
float lerp )
inlinestatic

Definition at line 270 of file wwmath.h.

◆ Lerp() [4/4]

static float WWMath::Lerp ( float a,
float b,
float lerp )
static

◆ Max() [1/2]

float WWMath::Max ( float a,
float b )
inlinestatic

Definition at line 264 of file wwmath.h.

◆ Max() [2/2]

static float WWMath::Max ( float a,
float b )
static

◆ Min() [1/2]

float WWMath::Min ( float a,
float b )
inlinestatic

Definition at line 258 of file wwmath.h.

◆ Min() [2/2]

static float WWMath::Min ( float a,
float b )
static

◆ Random_Float() [1/4]

float WWMath::Random_Float ( float min,
float max )
inlinestatic

Definition at line 203 of file wwmath.h.

◆ Random_Float() [2/4]

static float WWMath::Random_Float ( float min,
float max )
static

◆ Random_Float() [3/4]

float WWMath::Random_Float ( void )
static

Definition at line 78 of file wwmath.cpp.

◆ Random_Float() [4/4]

static float WWMath::Random_Float ( void )
static

◆ Shutdown()

void WWMath::Shutdown ( void )
static

Definition at line 73 of file wwmath.cpp.

◆ Sign() [1/2]

float WWMath::Sign ( float val)
inlinestatic

Definition at line 182 of file wwmath.h.

◆ Sign() [2/2]

static float WWMath::Sign ( float val)
static

◆ Sin()

WWINLINE float WWMath::Sin ( float val)
static

Definition at line 378 of file wwmath.h.

◆ Sqrt() [1/2]

WWINLINE float WWMath::Sqrt ( float val)
static

Definition at line 568 of file wwmath.h.

◆ Sqrt() [2/2]

static float WWMath::Sqrt ( float val)
inlinestatic

Definition at line 93 of file wwmath.h.

◆ Unit_Float_To_Byte() [1/2]

static unsigned char WWMath::Unit_Float_To_Byte ( float f)
inlinestatic

Definition at line 174 of file wwmath.h.

◆ Unit_Float_To_Byte() [2/2]

static unsigned char WWMath::Unit_Float_To_Byte ( float f)
inlinestatic

Definition at line 114 of file wwmath.h.

◆ Wrap() [1/4]

double WWMath::Wrap ( double val,
double min = 0.0f,
double max = 1.0f )
inlinestatic

Definition at line 244 of file wwmath.h.

◆ Wrap() [2/4]

static double WWMath::Wrap ( double val,
double min = 0.0f,
double max = 1.0f )
static

◆ Wrap() [3/4]

float WWMath::Wrap ( float val,
float min = 0.0f,
float max = 1.0f )
inlinestatic

Definition at line 229 of file wwmath.h.

◆ Wrap() [4/4]

static float WWMath::Wrap ( float val,
float min = 0.0f,
float max = 1.0f )
static

The documentation for this class was generated from the following files: