diff --git a/src/main/java/com/sk89q/worldedit/Vector.java b/src/main/java/com/sk89q/worldedit/Vector.java index 45e28c70d..79a030ef5 100644 --- a/src/main/java/com/sk89q/worldedit/Vector.java +++ b/src/main/java/com/sk89q/worldedit/Vector.java @@ -612,6 +612,16 @@ public class Vector { return new BlockVector(this); } + /** + * Gets the dot product of this and another vector. + * + * @param other + * @return the dot product of this and the other vector + */ + public double dot(Vector other) { + return x * other.x + y * other.y + z * other.z; + } + /** * Gets the minimum components of two vectors. *