From 6c5d1236c70e022047f7c4acc265ddb99be3c4c9 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Tue, 16 Aug 2011 18:42:29 +0200 Subject: [PATCH] Fixed non-integer radius support for /thaw and /snow. --- src/main/java/com/sk89q/worldedit/EditSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/EditSession.java b/src/main/java/com/sk89q/worldedit/EditSession.java index 2de4b69ca..ac17b7f84 100644 --- a/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1923,7 +1923,7 @@ public class EditSession { public int thaw(Vector pos, double radius) throws MaxChangedBlocksException { int affected = 0; - int radiusSq = (int)Math.pow(radius, 2); + double radiusSq = radius*radius; int ox = pos.getBlockX(); int oy = pos.getBlockY(); @@ -1972,7 +1972,7 @@ public class EditSession { public int simulateSnow(Vector pos, double radius) throws MaxChangedBlocksException { int affected = 0; - int radiusSq = (int)Math.pow(radius, 2); + double radiusSq = radius*radius; int ox = pos.getBlockX(); int oy = pos.getBlockY();