Skip to content

Commit

Permalink
Fixing geosphere testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-Mattheus-Moerman committed May 9, 2024
1 parent b3e3964 commit 640529b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1545,12 +1545,12 @@ end
F, V = geosphere(n, r)
ind = round.(Int64,range(1,length(V),6)) # Sample indices
@test F isa Vector{TriangleFace{Int64}}
@test length(F) == 4^n*20
@test V isa Vector{Point3{Float64}}
@test isapprox(V[ind],Point{3, Float64}[[0.0, -0.5257311121191336, -0.85065080835204],
[-0.5877852522924731, -0.6881909602355868, -0.42532540417602], [0.26286555605956685, -0.16245984811645317, -0.9510565162951538],
[-0.25989191300775444, 0.43388856455269487, 0.8626684804161864], [0.9129824929322992, 0.3996070517018512, 0.08232358003196016],
[0.13279247682790243, -0.2201170274732924, 0.9663925974024391]], atol=eps_level)
@test length(F) == 4^n*20 # 20 since the icosahedron is the start geometry
@test V isa Vector{Point{3,Float64}}
@test isapprox(V[ind],GeometryBasics.Point{3, Float64}[[0.0, -0.5257311121191336, -0.85065080835204],
[-0.25989191300775444, -0.43388856455269487, 0.8626684804161864], [0.5133754412304479, 0.6465777917977317, 0.5642542117657715],
[0.21302286564912973, -0.5712516591357086, -0.7926492292592814], [0.840177885327139, -0.5192584897281833, 0.15643446504023087],
[-0.7838430424199713, 0.08108629344330351, -0.6156420208736807]], atol=eps_level)
@test isapprox(norm.(V),fill(r,length(V))) # Test radii
end

Expand Down

0 comments on commit 640529b

Please sign in to comment.