Applied the same interpolate to interpolateLocal

treatment to Vector2f and 4f... fortunately no
JME code seems to use these.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10797 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
PSp..om 11 years ago
parent 1fc55d2eb0
commit 5a1e7dbd63
  1. 4
      engine/src/core/com/jme3/math/Vector2f.java
  2. 4
      engine/src/core/com/jme3/math/Vector4f.java

@ -237,7 +237,7 @@ public final class Vector2f implements Savable, Cloneable, java.io.Serializable
* An amount between 0.0 - 1.0 representing a percentage change
* from this towards finalVec
*/
public Vector2f interpolate(Vector2f finalVec, float changeAmnt) {
public Vector2f interpolateLocal(Vector2f finalVec, float changeAmnt) {
this.x = (1 - changeAmnt) * this.x + changeAmnt * finalVec.x;
this.y = (1 - changeAmnt) * this.y + changeAmnt * finalVec.y;
return this;
@ -255,7 +255,7 @@ public final class Vector2f implements Savable, Cloneable, java.io.Serializable
* An amount between 0.0 - 1.0 representing a precentage change
* from beginVec towards finalVec
*/
public Vector2f interpolate(Vector2f beginVec, Vector2f finalVec,
public Vector2f interpolateLocal(Vector2f beginVec, Vector2f finalVec,
float changeAmnt) {
this.x = (1 - changeAmnt) * beginVec.x + changeAmnt * finalVec.x;
this.y = (1 - changeAmnt) * beginVec.y + changeAmnt * finalVec.y;

@ -783,7 +783,7 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
* change from this towards finalVec
*/
public Vector4f interpolate(Vector4f finalVec, float changeAmnt) {
public Vector4f interpolateLocal(Vector4f finalVec, float changeAmnt) {
this.x=(1-changeAmnt)*this.x + changeAmnt*finalVec.x;
this.y=(1-changeAmnt)*this.y + changeAmnt*finalVec.y;
this.z=(1-changeAmnt)*this.z + changeAmnt*finalVec.z;
@ -799,7 +799,7 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
* @param changeAmnt An amount between 0.0 - 1.0 representing a precentage
* change from beginVec towards finalVec
*/
public Vector4f interpolate(Vector4f beginVec,Vector4f finalVec, float changeAmnt) {
public Vector4f interpolateLocal(Vector4f beginVec,Vector4f finalVec, float changeAmnt) {
this.x=(1-changeAmnt)*beginVec.x + changeAmnt*finalVec.x;
this.y=(1-changeAmnt)*beginVec.y + changeAmnt*finalVec.y;
this.z=(1-changeAmnt)*beginVec.z + changeAmnt*finalVec.z;

Loading…
Cancel
Save