Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nullplay committed Dec 31, 2023
1 parent 18ec4e3 commit 1cdea3e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/dimensions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ virtual_intersect(ctx, a::Dimensionless, b::Dimensionless) = b

function virtual_intersect(ctx, a::Extent, b::Extent)
Extent(
start = @f(max($(getstart(a)), $(getstart(b)))),
stop = @f(min($(getstop(a)), $(getstop(b))))
start = simplify(@f(max($(getstart(a)), $(getstart(b)))), ctx),
stop = simplify(@f(min($(getstop(a)), $(getstop(b)))), ctx)
)
end

Expand All @@ -244,8 +244,8 @@ virtual_union(ctx, a::Dimensionless, b::Dimensionless) = b
#virtual_union(ctx, a, b) = virtual_union(ctx, promote(a, b)...)
function virtual_union(ctx, a::Extent, b::Extent)
Extent(
start = @f(min($(getstart(a)), $(getstart(b)))),
stop = @f(max($(getstop(a)), $(getstop(b))))
start = simplify(@f(min($(getstart(a)), $(getstart(b)))), ctx),
stop = simplify(@f(max($(getstop(a)), $(getstop(b)))), ctx)
)
end

Expand Down Expand Up @@ -299,14 +299,14 @@ is_continuous_extent(x::ParallelDimension) = is_continuous_extent(x.dim)

function virtual_intersect(ctx, a::ContinuousExtent, b::ContinuousExtent)
ContinuousExtent(
start = @f(max($(getstart(a)), $(getstart(b)))),
stop = @f(min($(getstop(a)), $(getstop(b))))
start = simplify(@f(max($(getstart(a)), $(getstart(b)))), ctx),
stop = simplify(@f(min($(getstop(a)), $(getstop(b)))), ctx)
)
end

function virtual_union(ctx, a::ContinuousExtent, b::ContinuousExtent)
ContinuousExtent(
start = @f(min($(getstart(a)), $(getstart(b)))),
stop = @f(max($(getstop(a)), $(getstop(b))))
start = simplify(@f(min($(getstart(a)), $(getstart(b)))), ctx),
stop = simplify(@f(max($(getstop(a)), $(getstop(b)))), ctx)
)
end

0 comments on commit 1cdea3e

Please sign in to comment.