Mercurial > repos > public > sbplib_julia
diff test/Grids/geometry_test.jl @ 1975:79adad4a15d6 feature/grids/geometry_functions
Implement Grids.jacobian for LineSegment
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 25 Feb 2025 22:42:14 +0100 |
parents | 3ed7ca1f60c4 |
children | 34a7e3919e9a |
line wrap: on
line diff
--- a/test/Grids/geometry_test.jl Tue Feb 25 22:39:28 2025 +0100 +++ b/test/Grids/geometry_test.jl Tue Feb 25 22:42:14 2025 +0100 @@ -50,6 +50,16 @@ @test l(1) == [2,3] @test l(1/2) == [1,2]/2 + [2,3]/2 end + + @testset "Grids.jacobian" begin + a, b = [1,2], [2,3] + l = LineSegment(a,b) + d = b-a + + @test Grids.jacobian(l,0) == d + @test Grids.jacobian(l,1) == d + @test Grids.jacobian(l,1/2) == d + end end @testset "linesegments" begin