Skip to content

Commit f1732d2

Browse files
committed
More accurate comments
1 parent 288751d commit f1732d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -2362,12 +2362,13 @@ public int deformRegion(final Region region, final Vector3 zero, final Vector3 u
23622362
final DoubleArrayList<BlockVector3, BaseBlock> queue = new DoubleArrayList<>(false);
23632363

23642364
for (BlockVector3 position : region) {
2365-
// offset, scale
2365+
// transform
23662366
final Vector3 scaled = position.toVector3().subtract(zero).divide(unit);
23672367

2368-
// transform
2368+
// deform
23692369
expression.evaluate(new double[]{scaled.getX(), scaled.getY(), scaled.getZ()}, timeout);
23702370

2371+
// untransform, round-nearest
23712372
final BlockVector3 sourcePosition = environment.toWorld(x.getValue(), y.getValue(), z.getValue());
23722373

23732374
// read block from world

worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public WorldEditExpressionEnvironment(Extent extent, Vector3 unit, Vector3 zero)
3838
}
3939

4040
public BlockVector3 toWorld(double x, double y, double z) {
41-
// unscale, unoffset, round-nearest
4241
return Vector3.at(x, y, z).multiply(unit).add(zero2).toBlockPoint();
4342
}
4443

0 commit comments

Comments
 (0)