Skip to content

Commit 7181b20

Browse files
authored
Merge pull request opentk#1772 from NogginBops/slerp-docs
Document that slerping between vectors of opposite direction is undefined.
2 parents a462122 + 7b5513f commit 7181b20

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/OpenTK.Mathematics/Vector/Vector3.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ public static void Lerp(in Vector3 a, in Vector3 b, Vector3 blend, out Vector3 r
814814
/// <summary>
815815
/// Returns a new vector that is the spherical interpolation of the two given vectors.
816816
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
817+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
817818
/// </summary>
818819
/// <param name="a">Unit vector start point.</param>
819820
/// <param name="b">Unit vector end point.</param>
@@ -844,6 +845,7 @@ public static Vector3 Slerp(Vector3 a, Vector3 b, float t)
844845
/// <summary>
845846
/// Returns a new vector that is the spherical interpolation of the two given vectors.
846847
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
848+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
847849
/// </summary>
848850
/// <param name="a">Unit vector start point.</param>
849851
/// <param name="b">Unit vector end point.</param>

src/OpenTK.Mathematics/Vector/Vector3d.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ public static void Lerp(in Vector3d a, in Vector3d b, Vector3d blend, out Vector
808808
/// <summary>
809809
/// Returns a new vector that is the spherical interpolation of the two given vectors.
810810
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
811+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
811812
/// </summary>
812813
/// <param name="a">Unit vector start point.</param>
813814
/// <param name="b">Unit vector end point.</param>
@@ -838,6 +839,7 @@ public static Vector3d Slerp(Vector3d a, Vector3d b, double t)
838839
/// <summary>
839840
/// Returns a new vector that is the spherical interpolation of the two given vectors.
840841
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
842+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
841843
/// </summary>
842844
/// <param name="a">Unit vector start point.</param>
843845
/// <param name="b">Unit vector end point.</param>

src/OpenTK.Mathematics/Vector/Vector4.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ public static void Lerp(in Vector4 a, in Vector4 b, Vector4 blend, out Vector4 r
804804
/// <summary>
805805
/// Returns a new vector that is the spherical interpolation of the two given vectors.
806806
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
807+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
807808
/// </summary>
808809
/// <param name="a">Unit vector start point.</param>
809810
/// <param name="b">Unit vector end point.</param>
@@ -834,6 +835,7 @@ public static Vector4 Slerp(Vector4 a, Vector4 b, float t)
834835
/// <summary>
835836
/// Returns a new vector that is the spherical interpolation of the two given vectors.
836837
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
838+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
837839
/// </summary>
838840
/// <param name="a">Unit vector start point.</param>
839841
/// <param name="b">Unit vector end point.</param>

src/OpenTK.Mathematics/Vector/Vector4d.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ public static void Lerp(in Vector4d a, in Vector4d b, Vector4d blend, out Vector
799799
/// <summary>
800800
/// Returns a new vector that is the spherical interpolation of the two given vectors.
801801
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
802+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
802803
/// </summary>
803804
/// <param name="a">Unit vector start point.</param>
804805
/// <param name="b">Unit vector end point.</param>
@@ -829,6 +830,7 @@ public static Vector4d Slerp(Vector4d a, Vector4d b, double t)
829830
/// <summary>
830831
/// Returns a new vector that is the spherical interpolation of the two given vectors.
831832
/// <paramref name="a"/> and <paramref name="b"/> need to be normalized for this function to work properly.
833+
/// Results are undefined for vectors that point in opposite directions or very close to opposite directions.
832834
/// </summary>
833835
/// <param name="a">Unit vector start point.</param>
834836
/// <param name="b">Unit vector end point.</param>

0 commit comments

Comments
 (0)