Optimize vectors normalization
This commit is contained in:
@@ -304,7 +304,7 @@ namespace FlaxEngine
|
||||
public void Normalize()
|
||||
{
|
||||
float length = Length;
|
||||
if (!Mathf.IsZero(length))
|
||||
if (length >= Mathf.Epsilon)
|
||||
{
|
||||
float inverse = 1.0f / length;
|
||||
X *= inverse;
|
||||
|
||||
Reference in New Issue
Block a user