OSDN Git Service

Fixed the line segment extents so that it doesn't act twice
authorPSpeed42@gmail.com <PSpeed42@gmail.com@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Sat, 29 Oct 2011 09:13:29 +0000 (09:13 +0000)
committerPSpeed42@gmail.com <PSpeed42@gmail.com@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Sat, 29 Oct 2011 09:13:29 +0000 (09:13 +0000)
as long as it's supposed to be.

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

engine/src/core/com/jme3/math/LineSegment.java

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