public class TARDISVector3D
extends java.lang.Object
Constructor and Description |
---|
TARDISVector3D(org.bukkit.Location location)
Construct an immutable floating point 3D vector from a location object.
|
TARDISVector3D(org.bukkit.util.Vector vector)
Construct an immutable floating point 3D vector from a mutable Bukkit vector.
|
Modifier and Type | Method and Description |
---|---|
TARDISVector3D |
abs()
Retrieve the absolute value of this vector.
|
TARDISVector3D |
add(double x,
double y,
double z)
Adds the current vector and a given vector together, producing a result vector.
|
TARDISVector3D |
add(TARDISVector3D other)
Adds the current vector and a given position vector, producing a result vector.
|
TARDISVector3D |
multiply(double factor)
Multiply each dimension in the current vector by the given factor.
|
TARDISVector3D |
multiply(int factor)
Multiply each dimension in the current vector by the given factor.
|
TARDISVector3D |
subtract(TARDISVector3D other)
Substracts the current vector and a given vector, producing a result position.
|
java.lang.String |
toString() |
public TARDISVector3D(org.bukkit.Location location)
location
- - the location to copy.public TARDISVector3D(org.bukkit.util.Vector vector)
vector
- - the mutable real Bukkit vector to copy.public TARDISVector3D add(TARDISVector3D other)
other
- - the other vector.public TARDISVector3D add(double x, double y, double z)
x
- the x coordinate to addy
- the y coordinate to addz
- the z coordinate to addpublic TARDISVector3D subtract(TARDISVector3D other)
other
- - the other position.public TARDISVector3D multiply(int factor)
factor
- - multiplier.public TARDISVector3D multiply(double factor)
factor
- - multiplier.public TARDISVector3D abs()
public java.lang.String toString()
toString
in class java.lang.Object