Fix conversion to degrees in Vector3.Angle

This commit is contained in:
stefnotch
2021-02-01 22:40:19 +01:00
committed by GitHub
parent 283714a39f
commit 62f2ccb942

View File

@@ -1221,7 +1221,7 @@ namespace FlaxEngine
float dot = Mathf.Clamp(Dot(from.Normalized, to.Normalized), -1F, 1F);
if (Mathf.Abs(dot) > (1F - Mathf.Epsilon))
return dot > 0F ? 0F : 180F;
return Mathf.Acos(dot) * Mathf.DegreesToRadians;
return Mathf.Acos(dot) * Mathf.RadiansToDegrees;
}
/// <summary>