/*!
 *  \addtogroup Math
 *  @{
 */
 
/**
 * @brief A collection of common math functions
 */
namespace Math
{

	/**
	 * @brief Returns the tangent of angle f in radians.
	 */
	float Tan(float f);

	/**
	 * @brief Returns the cosine of angle f in radians
	 */
	float Cos(float f);

	/**
	 * @brief Returns the sine of angle f in radians
	 */
	float Sin(float f);

	/**
	 * @brief Returns square root of f
	 */
	float Sqrt(float f);

	/**
	 * @brief Returns the arc-cosine of f - the angle in radians whose cosine is f
	 */
	float ACos(float f);

	/**
	 * @brief Returns the absolute value of f
	 */
	float Fabs(float f);

	/**
	 * @brief Returns the angle in radians whose Tan is y/x
	 */
	float ATan2(float y, float x);

	/**
	 * @brief Returns the natural (base e) logarithm of a specified number
	 */
	float Log(float f);

	/**
	 * @brief Returns the largest integer smaller to or equal to f
	 */
	float Floor(float f);

	/**
	 * @brief Returns the smallest integer greater to or equal to f
	 */
	float Ceil(float f);

	/**
	 * @brief Returns the absolute value of i.
	 */
	int Abs(int i);

	/**
	 * @brief Returns inverse square root of f
	 */
	float InvSqrt(float f);
	
	/**
	 * @brief Radians-to-Degrees conversion
	 */
	float Rad2Deg(float rads);
	
	/**
	 * @brief Degrees-to-radians conversion
	 */
	float Deg2Rad(float degs);

	/**
	 * @brief Returns f raised to power p
	 */
	float Pow(float f, float p);

	/**
	 * @brief Range 0..255
	 */
	uint8 RandByte();

	/**
	 * @brief Range 0..32767
	 */
	int Rand();

	/**
	 * @brief Range 0..32767
	 */
	int SysRand();

	/**
	 * @brief Range 0..1
	 */
	float RandFloat();

	/**
	 * @brief Range -1..1
	 */
	float RandCFloat(void);

	/**
	 * @brief Range 0..max-1
	 */
	int RandMax(const int max);

	/**
	 * @brief Returns a random float number between and min [inclusive] and max [inclusive]
	 */
	float RandRange(const float min, const float max);

	/**
	 * @brief increases \a value by \a incAmount up to \a max
	 */
	float IncMax(const float value, const float incAmount, const float max);

	float Accelerate(const float a, const float b, const float t);

	/**
	 * @brief Calculates the linear parameter t that produces the interpolant value within the range [a, b]
	 */
	float NLerp(const float a, const float b, const float t);

	/**
	 * @brief Linearly interpolates between a and b by t.
	 */
	float Lerp(float a, const float b, const float t);

	/**
	 * @brief Clamps value between a \a min and \a max float value
	 */
	void Clamp(float &out value, const float min, const float max);

	float HermiteBlend(const float a, const float b, const float t);

	/**
	 * @brief Interpolates between min and max with smoothing at the limits.
	 */
	float SmoothStep(const float from, const float to, const float t);

	float CosArc(const float f);

	float CosTween(const float f);

	kVec3 vecZero = kVec3(0, 0, 0);

	float pi = 3.141593f;

	/**
	 * @brief Returns largest of two or more values
	 */
	float Max(const float a, const float b);

	/**
	 * @brief Returns the smallest of two or more values
	 */
	float Min(const float a, const float b);
}

/**@}*/
