33 #ifndef H_DC_UTIL_MATH_INCLUDED
34 #define H_DC_UTIL_MATH_INCLUDED
36 #include <Dynacoe/Util/Vector.h>
59 static void Clamp(
double &i,
double min,
double max);
60 static void Clamp(
int&,
int min,
int max);
61 static void Clamp(
float &i,
float min,
float max);
69 static void SnapToNearest(
int & i,
int subdiv);
70 static void SnapToNearest(
float & i,
float subdiv);
71 static void SnapToNearest(
double & i,
double subdiv);
79 static float Step(
float & f,
float dest,
float stepSize);
88 static float RadsToDegrees(
float rads);
89 static float DegreesToRads(
float degrees);
105 float boundW,
float boundH);
static float GetHypotenuse(float a, float b)
Returns sqrt((pow(a, 2) + pow(b, 2)).
3D and 2D positional vector.
Definition: Vector.h:55
static bool IsVectorWithinBounds(const Dynacoe::Vector &src, const Dynacoe::Vector &boundPos, float boundW, float boundH)
Returns whether or not a point is within a rectangle bounding box. The edge of the bounding box is co...
static float Step(float &f, float dest, float stepSize)
Makes a value approach another.
static float Pi()
Returns a standard pi value.
Utility providing some additional math operations.
Definition: Math.h:51
static bool IsVectorWithinRange(const Dynacoe::Vector &p1, const Dynacoe::Vector &p2, float range)
Checks to see if a point is within a certain distance.