Browse Source

Fixed the line segment extents so that it doesn't act twice
as long as it's supposed to be.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8542 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 14 years ago
parent
commit
b13809bba3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/src/core/com/jme3/math/LineSegment.java

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

@@ -89,7 +89,7 @@ public class LineSegment implements Cloneable, Savable, java.io.Serializable {
     public LineSegment(Vector3f start, Vector3f end) {
     public LineSegment(Vector3f start, Vector3f end) {
         this.origin = new Vector3f(0.5f * (start.x + end.x), 0.5f * (start.y + end.y), 0.5f * (start.z + end.z));
         this.origin = new Vector3f(0.5f * (start.x + end.x), 0.5f * (start.y + end.y), 0.5f * (start.z + end.z));
         this.direction = end.subtract(start);
         this.direction = end.subtract(start);
-        this.extent = direction.length();
+        this.extent = direction.length() * 0.5f;
         direction.normalizeLocal();
         direction.normalizeLocal();
     }
     }