浏览代码

Add note to javadoc for Quaternion lookAt method (#1599)

Duncan Jauncey 4 年之前
父节点
当前提交
78ea4feb47
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      jme3-core/src/main/java/com/jme3/math/Quaternion.java

+ 3 - 1
jme3-core/src/main/java/com/jme3/math/Quaternion.java

@@ -1405,7 +1405,9 @@ public final class Quaternion implements Savable, Cloneable, java.io.Serializabl
      * <code>lookAt</code> is a convenience method for auto-setting the
      * <code>lookAt</code> is a convenience method for auto-setting the
      * quaternion based on a direction and an up vector. It computes
      * quaternion based on a direction and an up vector. It computes
      * the rotation to transform the z-axis to point into 'direction'
      * the rotation to transform the z-axis to point into 'direction'
-     * and the y-axis to 'up'.
+     * and the y-axis to 'up'.  Note that the results will be invalid
+     * if a zero length direction vector (0,0,0) is supplied, or if the 
+     * direction and up vectors are parallel.
      *
      *
      * @param direction
      * @param direction
      *            where to look at in terms of local coordinates
      *            where to look at in terms of local coordinates