This commit is contained in:
parent
257d7e9db5
commit
98c96ed24d
12 changed files with 782 additions and 22 deletions
|
|
@ -58,8 +58,18 @@ public class Vector3f {
|
|||
return z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the z value
|
||||
*
|
||||
* @param z the z value
|
||||
*/
|
||||
public void setZ(float z){
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add to the vector
|
||||
*
|
||||
* @param i The amount to add
|
||||
*/
|
||||
public void add(float i){
|
||||
|
|
@ -70,6 +80,7 @@ public class Vector3f {
|
|||
|
||||
/**
|
||||
* Add to the vector
|
||||
*
|
||||
* @param i The amount to add
|
||||
*/
|
||||
public void add(Vector3f i){
|
||||
|
|
@ -80,6 +91,7 @@ public class Vector3f {
|
|||
|
||||
/**
|
||||
* Add to the vector
|
||||
*
|
||||
* @param i The amount to add
|
||||
*/
|
||||
public void add(Vector2f i){
|
||||
|
|
@ -89,6 +101,7 @@ public class Vector3f {
|
|||
|
||||
/**
|
||||
* Add to the vector
|
||||
*
|
||||
* @param x The value to add to the x value
|
||||
* @param y The value to add to the y value
|
||||
* @param z The value to add to the z value
|
||||
|
|
@ -99,7 +112,16 @@ public class Vector3f {
|
|||
this.z += z;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a copy of this vector
|
||||
*
|
||||
* @return A copy of this vector
|
||||
*/
|
||||
public Vector3f getCopy(){
|
||||
return new Vector3f(x,y,z);
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return "Vector2f["+x+","+y+"]";
|
||||
return "Vector3f["+x+","+y+","+z+"]";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue