Skip to content

Commit

Permalink
Remove extra underscore between ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
syockit committed Oct 17, 2015
1 parent 8438184 commit dc3b41e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engine/crop.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ func Crop(parent Quantity, x1, x2, y1, y2, z1, z2 int) *cropped {
util.Argument(x1 >= 0 && y1 >= 0 && z1 >= 0)
util.Argument(x2 <= n[X] && y2 <= n[Y] && z2 <= n[Z])

name := parent.Name()
name := parent.Name() + "_"
if x1 != 0 || x2 != n[X] {
name += "_xrange" + rangeStr(x1, x2)
name += "xrange" + rangeStr(x1, x2)
}
if y1 != 0 || y2 != n[Y] {
name += "_yrange" + rangeStr(y1, y2)
name += "yrange" + rangeStr(y1, y2)
}
if z1 != 0 || z2 != n[Z] {
name += "_zrange" + rangeStr(z1, z2)
name += "zrange" + rangeStr(z1, z2)
}

return &cropped{parent, name, x1, x2, y1, y2, z1, z2}
Expand Down

0 comments on commit dc3b41e

Please sign in to comment.