Skip to content

Commit

Permalink
Merge pull request #26 from RoboticExplorationLab/tf_assert_fix
Browse files Browse the repository at this point in the history
Use approx for comparing timestep and final time
  • Loading branch information
bjack205 authored Apr 28, 2022
2 parents 2b1ae08 + d746089 commit 6ea2482
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 6ea2482

Please sign in to comment.