From eafde8cc49a608e29269e28bd849fe1229cc22e8 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Tue, 3 Jan 2012 14:11:55 +0100 Subject: [PATCH] Added Vector2D.toVector(double y). --- src/main/java/com/sk89q/worldedit/Vector2D.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/Vector2D.java b/src/main/java/com/sk89q/worldedit/Vector2D.java index fc0cc2a0a..8f251820c 100644 --- a/src/main/java/com/sk89q/worldedit/Vector2D.java +++ b/src/main/java/com/sk89q/worldedit/Vector2D.java @@ -575,6 +575,15 @@ public class Vector2D { return new Vector(x, 0, z); } + /** + * Creates a 3D vector by adding the specified Y component to this vector. + * + * @return Vector + */ + public Vector toVector(double y) { + return new Vector(x, y, z); + } + /** * Gets the minimum components of two vectors. *