2021-05-17 05:39:23 +02:00
|
|
|
package engine.math;
|
2021-05-13 20:40:21 +02:00
|
|
|
|
2021-05-13 16:30:18 +02:00
|
|
|
public class Vector3f {
|
|
|
|
|
|
|
|
public float x, y, z;
|
|
|
|
|
|
|
|
public Vector3f(){
|
|
|
|
x = 0.0f;
|
|
|
|
y = 0.0f;
|
|
|
|
z = 0.0f;
|
|
|
|
}
|
|
|
|
|
2021-06-01 22:22:10 +02:00
|
|
|
public Vector3f(float x, float y){
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
2021-06-02 17:30:43 +02:00
|
|
|
this.z = 0.0f;
|
2021-06-01 22:22:10 +02:00
|
|
|
}
|
|
|
|
|
2021-05-13 16:30:18 +02:00
|
|
|
public Vector3f(float x, float y, float z){
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
|
|
|
}
|
|
|
|
|
2021-06-04 00:16:03 +02:00
|
|
|
public Vector3f divXY(float div){
|
|
|
|
return new Vector3f(this.x / div, this.y / div, this.z);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Vector3f divXYZ(float div){
|
|
|
|
return new Vector3f(this.x / div, this.y / div, this.z / div);
|
2021-05-20 23:28:45 +02:00
|
|
|
}
|
|
|
|
|
2021-05-13 16:30:18 +02:00
|
|
|
}
|