Move to LinearAlgebra namespace.
This commit is contained in:
@@ -7,18 +7,23 @@
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext/scalar_constants.hpp>
|
||||
|
||||
|
||||
class Spring
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline float lerp(float a, float b, float t) {
|
||||
|
||||
namespace LinearAlgebra {
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
class Vector4;
|
||||
class Angle2D;
|
||||
class EulerAngle;
|
||||
class AxisAngle;
|
||||
class CoordinateFrame;
|
||||
class Matrix2x2;
|
||||
class Matrix3x3;
|
||||
class Matrix4x4;
|
||||
class Transform2D;
|
||||
class Transform3D;
|
||||
inline float lerp(float a, float b, float t);
|
||||
}
|
||||
|
||||
|
||||
// Note: Josh Linear Algebra Types are designed as Immutable Data Types
|
||||
// x, y, z, w, etc. values should not and can not be set directly.
|
||||
// rather, you just construct a new type and assign it.
|
||||
@@ -35,12 +40,8 @@ inline float lerp(float a, float b, float t) {
|
||||
#define IMMUTABLE !MUTABLE
|
||||
#endif
|
||||
|
||||
class Vector2;
|
||||
class Vector3;
|
||||
class Vector4;
|
||||
class EulerAngle;
|
||||
class AxisAngle;
|
||||
class CoordinateFrame;
|
||||
namespace LinearAlgebra
|
||||
{
|
||||
|
||||
class Vector2 {
|
||||
public:
|
||||
@@ -368,5 +369,5 @@ inline namespace VectorMath {
|
||||
//returned.y = (atan2f(eP.x - sP.x,eP.z - sP.z) / M_PI * 180.0f);
|
||||
return {static_cast<float>((-(asinf((eP.y - sP.y) / distance(sP, eP)) * 180.0f / pi ))),static_cast<float>((atan2f(eP.x - sP.x,eP.z - sP.z) / pi * 180.0f)),0};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,5 +1,9 @@
|
||||
#include <types/vector.h>
|
||||
|
||||
namespace LinearAlgebra {
|
||||
|
||||
|
||||
|
||||
#pragma region vector2
|
||||
|
||||
bool Vector2::IsWithinMarginOfError(const Vector2& rhs, float margin) const
|
||||
@@ -450,3 +454,4 @@ EulerAngle EulerAngle::movementAngle() const
|
||||
|
||||
|
||||
#pragma endregion
|
||||
}
|
Reference in New Issue
Block a user