Use CHECK_DEBUG over ASSERT in normalized direction checks

This commit is contained in:
2024-08-07 21:15:34 +03:00
parent a066e0078d
commit f759f94cfa
6 changed files with 40 additions and 40 deletions

View File

@@ -952,7 +952,7 @@ void DebugDraw::DrawActorsTree(Actor* actor)
void DebugDraw::DrawAxisFromDirection(const Vector3& origin, const Vector3& direction, float size, float duration, bool depthTest)
{
ASSERT(direction.IsNormalized());
CHECK_DEBUG(direction.IsNormalized());
const auto rot = Quaternion::FromDirection(direction);
const Vector3 up = (rot * Vector3::Up);
const Vector3 forward = (rot * Vector3::Forward);
@@ -978,7 +978,7 @@ void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, const C
void DebugDraw::DrawRay(const Vector3& origin, const Vector3& direction, const Color& color, float length, float duration, bool depthTest)
{
ASSERT(direction.IsNormalized());
CHECK_DEBUG(direction.IsNormalized());
if (isnan(length) || isinf(length))
return;
DrawLine(origin, origin + (direction * length), color, duration, depthTest);