浏览代码

* Replaced mandatory check in Ray.setDirection() with assertion

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8860 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..om 14 年之前
父节点
当前提交
8c94853989
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      engine/src/core/com/jme3/math/Ray.java

+ 1 - 3
engine/src/core/com/jme3/math/Ray.java

@@ -476,9 +476,7 @@ public final class Ray implements Savable, Cloneable, Collidable, java.io.Serial
      * @param direction the direction of the ray.
      */
     public void setDirection(Vector3f direction) {
-        if (!direction.isUnitVector()) {
-            throw new IllegalArgumentException("direction must be a unit vector");
-        }
+        assert direction.isUnitVector();
         this.direction.set(direction);
     }