Add assertions for checking against un-normalized direction vectors
This commit is contained in:
@@ -289,6 +289,7 @@ void Quaternion::Billboard(const Float3& objectPosition, const Float3& cameraPos
|
||||
|
||||
Quaternion Quaternion::FromDirection(const Float3& direction)
|
||||
{
|
||||
ASSERT(direction.IsNormalized());
|
||||
Quaternion orientation;
|
||||
if (Float3::Dot(direction, Float3::Up) >= 0.999f)
|
||||
{
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
: Position(position)
|
||||
, Direction(direction)
|
||||
{
|
||||
ASSERT(Direction.IsNormalized());
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user