You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
C#: Add missing match check in Quaternion.Slerpni
This commit is contained in:
@@ -292,6 +292,17 @@ namespace Godot
|
|||||||
/// <returns>The resulting quaternion of the interpolation.</returns>
|
/// <returns>The resulting quaternion of the interpolation.</returns>
|
||||||
public Quaternion Slerpni(Quaternion to, real_t weight)
|
public Quaternion Slerpni(Quaternion to, real_t weight)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
if (!IsNormalized())
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Quaternion is not normalized");
|
||||||
|
}
|
||||||
|
if (!to.IsNormalized())
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Argument is not normalized", nameof(to));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
real_t dot = Dot(to);
|
real_t dot = Dot(to);
|
||||||
|
|
||||||
if (Mathf.Abs(dot) > 0.9999f)
|
if (Mathf.Abs(dot) > 0.9999f)
|
||||||
|
|||||||
Reference in New Issue
Block a user