Moved hydra to its own namespace

This commit is contained in:
2023-08-05 21:00:37 -07:00
parent 6cb2c06bea
commit 9c1de3d017
27 changed files with 110 additions and 138 deletions

View File

@@ -36,7 +36,7 @@
#include "vector2.h"
#include "vector4.h"
namespace kraken {
namespace hydra {
class Vector3
{
@@ -136,16 +136,16 @@ public:
static Vector3 Slerp(const Vector3& v1, const Vector3& v2, float d);
static void OrthoNormalize(Vector3& normal, Vector3& tangent); // Gram-Schmidt Orthonormalization
};
static_assert(std::is_pod<Vector3>::value, "kraken::Vector3 must be a POD type.");
static_assert(std::is_pod<Vector3>::value, "hydra::Vector3 must be a POD type.");
} // namespace kraken
} // namespace hydra
namespace std {
template<>
struct hash<kraken::Vector3>
struct hash<hydra::Vector3>
{
public:
size_t operator()(const kraken::Vector3& s) const
size_t operator()(const hydra::Vector3& s) const
{
size_t h1 = hash<float>()(s.x);
size_t h2 = hash<float>()(s.y);