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.
58 lines
751 B
58 lines
751 B
package mightypork.utils.math.vect;
|
|
|
|
|
|
/**
|
|
* Mutable coordinate.<br>
|
|
* All Vec methods (except copy) alter data values and return this instance.
|
|
*
|
|
* @author MightyPork
|
|
*/
|
|
class VectMutableImpl extends VectMutable {
|
|
|
|
private double x, y, z;
|
|
|
|
|
|
/**
|
|
* @param x X coordinate
|
|
* @param y Y coordinate
|
|
* @param z Z coordinate
|
|
*/
|
|
public VectMutableImpl(double x, double y, double z) {
|
|
super();
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
}
|
|
|
|
|
|
@Override
|
|
public double x()
|
|
{
|
|
return x;
|
|
}
|
|
|
|
|
|
@Override
|
|
public double y()
|
|
{
|
|
return y;
|
|
}
|
|
|
|
|
|
@Override
|
|
public double z()
|
|
{
|
|
return z;
|
|
}
|
|
|
|
|
|
@Override
|
|
public VectMutableImpl result(double x, double y, double z)
|
|
{
|
|
this.x = x;
|
|
this.y = y;
|
|
this.z = z;
|
|
|
|
return this;
|
|
}
|
|
}
|
|
|