1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/MathHelper.h
Halofreak1990 40c4811c04 Got everything to compile again.
Began transforming of current API to represent XNA 4.0, which is cleaner.
Dictionary<TKey, TValue> should now work (sort of-- need to implement resizing and enumerating)
Currently hunting down GraphicsDevice initialization
Up next: (hopefully successful) rendering of primitives
2012-09-28 20:36:02 +00:00

42 lines
1.6 KiB
C++

/********************************************************
* MathHelper.h *
* *
* XFX MathHelper definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_MATHHELPER_
#define _XFX_MATHHELPER_
namespace XFX
{
// Contains commonly used precalculated values.
class MathHelper
{
private:
MathHelper(); // Private constructor to prevent instantiation.
public:
static const float E;
static const float Log10E;
static const float Log2E;
static const float Pi;
static const float PiOver2;
static const float PiOver4;
static const float TwoPi;
static float Baricentric(const float value1, const float value2, const float value3, const float amount1, const float amount2);
static float CatmullRom(const float value1, const float value2, const float value3, const float value4, const float amount);
static float Clamp(const float value, const float min, const float max);
static float Distance(const float value1, const float value2);
static float Hermite(const float value1, const float tangent1, const float value2, const float tangent2, const float amount);
static float Lerp(const float value1, const float value2, const float amount);
static float Max(const float value1, const float value2);
static float Min(const float value1, const float value2);
static float SmoothStep(const float value1, const float value2, const float amount);
static float ToDegrees(const float radians);
static float ToRadians(const float degrees);
};
}
#endif //_XFX_MATHHELPER_