浏览代码

Modified maxLocal and minLocal to return 'this' to
match other methods.


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

PSp..om 12 年之前
父节点
当前提交
e7aa7eb627
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 4 2
      engine/src/core/com/jme3/math/Vector3f.java
  2. 4 2
      engine/src/core/com/jme3/math/Vector4f.java

+ 4 - 2
engine/src/core/com/jme3/math/Vector3f.java

@@ -806,10 +806,11 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable
      * in this vector.
      * in this vector.
      * @param other 
      * @param other 
      */
      */
-    public void maxLocal(Vector3f other){
+    public Vector3f maxLocal(Vector3f other){
         x = other.x > x ? other.x : x;
         x = other.x > x ? other.x : x;
         y = other.y > y ? other.y : y;
         y = other.y > y ? other.y : y;
         z = other.z > z ? other.z : z;
         z = other.z > z ? other.z : z;
+        return this;
     }
     }
 
 
     /**
     /**
@@ -818,10 +819,11 @@ public final class Vector3f implements Savable, Cloneable, java.io.Serializable
      * in this vector.
      * in this vector.
      * @param other
      * @param other
      */
      */
-    public void minLocal(Vector3f other){
+    public Vector3f minLocal(Vector3f other){
         x = other.x < x ? other.x : x;
         x = other.x < x ? other.x : x;
         y = other.y < y ? other.y : y;
         y = other.y < y ? other.y : y;
         z = other.z < z ? other.z : z;
         z = other.z < z ? other.z : z;
+        return this;
     }
     }
 
 
     /**
     /**

+ 4 - 2
engine/src/core/com/jme3/math/Vector4f.java

@@ -733,11 +733,12 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
      * in this vector.
      * in this vector.
      * @param other
      * @param other
      */
      */
-    public void maxLocal(Vector4f other){
+    public Vector4f maxLocal(Vector4f other){
         x = other.x > x ? other.x : x;
         x = other.x > x ? other.x : x;
         y = other.y > y ? other.y : y;
         y = other.y > y ? other.y : y;
         z = other.z > z ? other.z : z;
         z = other.z > z ? other.z : z;
         w = other.w > w ? other.w : w;
         w = other.w > w ? other.w : w;
+        return this;
     }
     }
 
 
     /**
     /**
@@ -746,11 +747,12 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
      * in this vector.
      * in this vector.
      * @param other
      * @param other
      */
      */
-    public void minLocal(Vector4f other){
+    public Vector4f minLocal(Vector4f other){
         x = other.x < x ? other.x : x;
         x = other.x < x ? other.x : x;
         y = other.y < y ? other.y : y;
         y = other.y < y ? other.y : y;
         z = other.z < z ? other.z : z;
         z = other.z < z ? other.z : z;
         w = other.w < w ? other.w : w;
         w = other.w < w ? other.w : w;
+        return this;
     }
     }
 
 
     /**
     /**