This commit is contained in:
aozhiwei 2024-02-14 16:11:14 +08:00
parent 3cbdd2b407
commit eb6800f64c
2 changed files with 6 additions and 0 deletions

View File

@ -96,3 +96,8 @@ glm::vec3 GlmHelper::Vec2ToVec3(const glm::vec2& v2)
{
return glm::vec3(v2.x, 0.0f, v2.y);
}
bool GlmHelper::IsValidVec3(const glm::vec3& v)
{
return !(isnan(v.x));
}

View File

@ -14,6 +14,7 @@ class GlmHelper
static float Norm(const glm::vec3& v);
static float Norm2D(const glm::vec3& v);
static bool IsZero(const glm::vec3& v);
static bool IsValidVec3(const glm::vec3& v);
static bool IsEqual2D(const glm::vec3& v1, const glm::vec3& v2);
static bool IsEqual3D(const glm::vec3& v1, const glm::vec3& v2);