Skip to content

Commit

Permalink
Fix for 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
yha committed May 4, 2020
1 parent ec188eb commit db01b5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ticks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function bounding_order_of_magnitude(xspan::DT) where DT
end

struct Ticks{T} <: AbstractRange{T}
u::UnitRange{Int}
u::UnitRange{Int64}
q::Int
z::Int
step::Float64
Expand All @@ -49,8 +49,8 @@ Base.show(io::IO, t::Ticks{T}) where T = print(io, _ticks_str(t), " * ", oneunit

function restrict_ticks(t::Ticks{T}, from, to) where T
tickspan = step(t)
u_start = max(first(t.u), ceil(Int, from / tickspan))
u_end = min(last(t.u), floor(Int, to / tickspan))
u_start = max(first(t.u), ceil(Int64, from / tickspan))
u_end = min(last(t.u), floor(Int64, to / tickspan))
t = Ticks{T}(u_start:u_end,t.q,t.z)

# Fix possible floating-point errors (may occur in division above, or due
Expand Down

0 comments on commit db01b5e

Please sign in to comment.