You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
894 B
78 lines
894 B
11 years ago
|
package mightypork.utils.math.vect;
|
||
11 years ago
|
|
||
|
|
||
|
/**
|
||
11 years ago
|
* Mutable coordinate.<br>
|
||
|
* All Vec methods (except copy) alter data values and return this instance.
|
||
11 years ago
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
11 years ago
|
public class VectVar extends VectMutable {
|
||
11 years ago
|
|
||
11 years ago
|
private double x, y, z;
|
||
11 years ago
|
|
||
|
|
||
11 years ago
|
/**
|
||
|
* @param x X coordinate
|
||
|
* @param y Y coordinate
|
||
|
* @param z Z coordinate
|
||
|
*/
|
||
11 years ago
|
VectVar(double x, double y, double z) {
|
||
11 years ago
|
super();
|
||
|
this.x = x;
|
||
|
this.y = y;
|
||
|
this.z = z;
|
||
|
}
|
||
11 years ago
|
|
||
|
|
||
11 years ago
|
@Override
|
||
11 years ago
|
public double x()
|
||
|
{
|
||
|
return x;
|
||
|
}
|
||
11 years ago
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public double y()
|
||
11 years ago
|
{
|
||
11 years ago
|
return y;
|
||
11 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public double z()
|
||
11 years ago
|
{
|
||
11 years ago
|
return z;
|
||
11 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public void setTo(double x, double y, double z)
|
||
11 years ago
|
{
|
||
11 years ago
|
this.x = x;
|
||
|
this.y = y;
|
||
|
this.z = z;
|
||
11 years ago
|
}
|
||
11 years ago
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public void setX(double x)
|
||
11 years ago
|
{
|
||
|
this.x = x;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public void setY(double y)
|
||
11 years ago
|
{
|
||
|
this.y = y;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
11 years ago
|
public void setZ(double z)
|
||
11 years ago
|
{
|
||
|
this.z = z;
|
||
|
}
|
||
11 years ago
|
}
|