Skip to content

Commit

Permalink
test(BSplines): fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutosh-b-b committed Oct 19, 2024
1 parent e439343 commit 6997490
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/interpolation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,14 @@ end

@testset "AbstractMatrix" begin
t = 0.1:0.1:1.0
u = [sin.(t) cos.(t)]' |> collect
A = BSplineInterpolation(u, t, 2, :Uniform, :Uniform)
u2d = [sin.(t) cos.(t)]' |> collect
A = BSplineInterpolation(u2d, t, 2, :Uniform, :Uniform)
t_test = 0.1:0.05:1.0
u_test = reduce(hcat, A.(t_test))
@test isapprox(u_test[1, :], sin.(t_test), atol = 1e-3)
@test isapprox(u_test[2, :], cos.(t_test), atol = 1e-3)

A = BSplineInterpolation(u, t, 2, :ArcLen, :Average)
A = BSplineInterpolation(u2d, t, 2, :ArcLen, :Average)
u_test = reduce(hcat, A.(t_test))
@test isapprox(u_test[1, :], sin.(t_test), atol = 1e-3)
@test isapprox(u_test[2, :], cos.(t_test), atol = 1e-3)
Expand Down

0 comments on commit 6997490

Please sign in to comment.