Changed //cyl and //hcyl to respect boundaries.

This commit is contained in:
sk89q
2010-10-17 17:39:20 -07:00
parent 3031480b38
commit 3ad6577be6
3 changed files with 88 additions and 2 deletions

View File

@ -99,6 +99,26 @@ public class Vector {
return (int)Math.round(x);
}
/**
* Set X.
*
* @param x
* @return new vector
*/
public Vector setX(double x) {
return new Vector(x, y, z);
}
/**
* Set X.
*
* @param x
* @return new vector
*/
public Vector setX(int x) {
return new Vector(x, y, z);
}
/**
* @return the y
*/
@ -113,6 +133,26 @@ public class Vector {
return (int)Math.round(y);
}
/**
* Set Y.
*
* @param y
* @return new vector
*/
public Vector setY(double y) {
return new Vector(x, y, z);
}
/**
* Set Y.
*
* @param y
* @return new vector
*/
public Vector setY(int y) {
return new Vector(x, y, z);
}
/**
* @return the z
*/
@ -127,6 +167,26 @@ public class Vector {
return (int)Math.round(z);
}
/**
* Set Z.
*
* @param z
* @return new vector
*/
public Vector setZ(double z) {
return new Vector(x, y, z);
}
/**
* Set Z.
*
* @param z
* @return new vector
*/
public Vector setZ(int z) {
return new Vector(x, y, z);
}
/**
* Adds two points.
*