Skip to content

Commit

Permalink
fix case of zero dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Nov 7, 2018
1 parent 0fc3c46 commit 18d3c64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/concrete_intersection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ function intersection(P1::AbstractHPolygon{N},
end
return false
end
@inline function is_first_constraint_tighter(lc1, lc2)
@inline function is_first_constraint_tighter(lc1::LinearConstraint{N}, lc2) where {N<:Real}
if lc1.a[1] == zero(N)
@assert lc2.a[1] == zero(N)
return lc1.b <= lc1.a[2]/lc2.a[2] * lc2.b
end
return lc1.b <= lc1.a[1]/lc2.a[1] * lc2.b
end

Expand Down

0 comments on commit 18d3c64

Please sign in to comment.