From 8c94853989b0f99d2e8eb012571e5c3c189cdfef Mon Sep 17 00:00:00 2001 From: "Sha..om" Date: Sun, 4 Dec 2011 21:55:48 +0000 Subject: [PATCH] * Replaced mandatory check in Ray.setDirection() with assertion git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8860 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/math/Ray.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engine/src/core/com/jme3/math/Ray.java b/engine/src/core/com/jme3/math/Ray.java index faefcb0ec..ba3d7e3ea 100644 --- a/engine/src/core/com/jme3/math/Ray.java +++ b/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); }