Clamped Y for //expand and //contract operations.
This commit is contained in:
@@ -472,6 +472,17 @@ public class Vector {
|
||||
&& getBlockZ() >= min.getBlockZ() && getBlockZ() <= max.getBlockY();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamp the Y component.
|
||||
*
|
||||
* @param min
|
||||
* @param max
|
||||
* @return
|
||||
*/
|
||||
public Vector clampY(int min, int max) {
|
||||
return new Vector(x, Math.max(min, Math.min(max, y)), z);
|
||||
}
|
||||
|
||||
/**
|
||||
* 2D transformation.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user