C#: Add missing match check in Quaternion.Slerpni
This commit is contained in:
parent
f9998455ce
commit
b35fcf3620
1 changed files with 11 additions and 0 deletions
|
|
@ -292,6 +292,17 @@ namespace Godot
|
|||
/// <returns>The resulting quaternion of the interpolation.</returns>
|
||||
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);
|
||||
|
||||
if (Mathf.Abs(dot) > 0.9999f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue