You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/12/22 23:17:27 UTC

[commons-numbers] 03/04: NUMBERS-86: updating Slerp javadocs to specify that the output quaternions are in positive polar form

This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 7fce9120288013e979c959fa173c273af418a073
Author: Matt Juntunen <ma...@hotmail.com>
AuthorDate: Sat Dec 22 14:46:07 2018 -0500

    NUMBERS-86: updating Slerp javadocs to specify that the output quaternions are in positive polar form
---
 .../main/java/org/apache/commons/numbers/quaternion/Slerp.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/commons-numbers-quaternion/src/main/java/org/apache/commons/numbers/quaternion/Slerp.java b/commons-numbers-quaternion/src/main/java/org/apache/commons/numbers/quaternion/Slerp.java
index da6b4d2..a7096ea 100644
--- a/commons-numbers-quaternion/src/main/java/org/apache/commons/numbers/quaternion/Slerp.java
+++ b/commons-numbers-quaternion/src/main/java/org/apache/commons/numbers/quaternion/Slerp.java
@@ -23,7 +23,9 @@ import java.util.function.DoubleFunction;
  *
  * The <em>Slerp</em> algorithm is designed to interpolate smoothly between
  * two rotations/orientations, producing a constant-speed motion along an arc.
- * The original purpose of this algorithm was to animate 3D rotations.
+ * The original purpose of this algorithm was to animate 3D rotations. All output
+ * quaternions are in positive polar form, meaning a unit quaternion with a positive
+ * scalar component.
  */
 public class Slerp implements DoubleFunction<Quaternion> {
     /**
@@ -70,12 +72,13 @@ public class Slerp implements DoubleFunction<Quaternion> {
      * Performs the interpolation.
      * The rotation returned by this method is controlled by the interpolation parameter, {@code t}.
      * All other values are interpolated (or extrapolated if {@code t} is outside of the
-     * {@code [0, 1]} range).
+     * {@code [0, 1]} range). The returned quaternion is in positive polar form, meaning that it
+     * is a unit quaternion with a positive scalar component.
      *
      * @param t Interpolation control parameter.
      * When {@code t = 0}, a rotation equal to the start instance is returned.
      * When {@code t = 1}, a rotation equal to the end instance is returned.
-     * @return an interpolated quaternion.
+     * @return an interpolated quaternion in positive polar form.
      */
     @Override
     public Quaternion apply(double t) {