Merge branch 'isnormalized_checks' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-isnormalized_checks
This commit is contained in:
@@ -289,7 +289,7 @@ void Quaternion::Billboard(const Float3& objectPosition, const Float3& cameraPos
|
||||
|
||||
Quaternion Quaternion::FromDirection(const Float3& direction)
|
||||
{
|
||||
ASSERT(direction.IsNormalized());
|
||||
CHECK_RETURN_DEBUG(direction.IsNormalized(), Quaternion::Identity);
|
||||
Quaternion orientation;
|
||||
if (Float3::Dot(direction, Float3::Up) >= 0.999f)
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@ using Real = System.Single;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using FlaxEngine.Assertions;
|
||||
|
||||
namespace FlaxEngine
|
||||
{
|
||||
@@ -77,6 +78,7 @@ namespace FlaxEngine
|
||||
{
|
||||
Position = position;
|
||||
Direction = direction;
|
||||
Assert.IsTrue(Direction.IsNormalized, "The Ray Direction was not normalized");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
: Position(position)
|
||||
, Direction(direction)
|
||||
{
|
||||
ASSERT(Direction.IsNormalized());
|
||||
CHECK_DEBUG(Direction.IsNormalized());
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user