Rogue: Savage Rats, a retro-themed dungeon crawler
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.
 
 
rogue-savage-rats/src/mightypork/utils/math/vect/NumConstrVect.java

53 lines
809 B

package mightypork.utils.math.vect;
import mightypork.utils.math.constraints.NumBound;
/**
* Coord view composed of given {@link NumBound}s, using their current values.
*
* @author MightyPork
*/
class NumConstrVect extends VectView {
private final NumBound constrX;
private final NumBound constrY;
private final NumBound constrZ;
public NumConstrVect(NumBound x, NumBound y, NumBound z) {
this.constrX = x;
this.constrY = y;
this.constrZ = z;
}
public NumConstrVect(NumBound x, NumBound y) {
this.constrX = x;
this.constrY = y;
this.constrZ = NumBound.ZERO;
}
@Override
public double x()
{
return constrX.getValue();
}
@Override
public double y()
{
return constrY.getValue();
}
@Override
public double z()
{
return constrZ.getValue();
}
}