Skip to content

Commit

Permalink
Use approx for comparing timestep and final time
Browse files Browse the repository at this point in the history
  • Loading branch information
jbwillis committed Apr 28, 2022
1 parent 2b1ae08 commit d746089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trajectories.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function _gettimeinfo(;t0=0.0, tf=NaN, dt=NaN, N=0)
Δt = tf - t0

# Check consistency
@assert tf == dt * (N-1) "Inconsistent time step and final time."
@assert tf dt * (N-1) "Inconsistent time step and final time."
@assert dt Δt / (N - 1) "Inconsistent time step and trajectory length."
return range(t0, tf, length=N)
end
Expand Down

0 comments on commit d746089

Please sign in to comment.