Skip to content

Commit 8d625a3

Browse files
authored
Update crop.jl
1 parent 32165d2 commit 8d625a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/projective/crop.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ function offsetcropbounds(
120120
offsets::NTuple{N, <:Number}) where N
121121
indices = bounds.rs
122122
mins = getindex.(indices, 1)
123-
diffs = length.(indices) .- sz
123+
diffs = length.(indices) .- sz .+ 1
124124

125-
startindices = round.(Int, mins .+ (diffs .* offsets))
125+
startindices = floor.(Int, mins .+ (diffs .* offsets))
126126
endindices = startindices .+ sz .- 1
127127

128128
bs = Bounds(UnitRange.(startindices, endindices))

0 commit comments

Comments
 (0)