From 261987ce7c5b424eff4184324cbe99f347bd7d1f Mon Sep 17 00:00:00 2001 From: pszufe Date: Sun, 9 Jan 2022 11:36:20 +0100 Subject: [PATCH] correct generate_point_in_bounds bug --- Project.toml | 2 +- src/routing.jl | 2 +- test/runtests.jl | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index bdfa9f9..d8a06b3 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OpenStreetMapX" uuid = "86cd37e6-c0ff-550b-95fe-21d72c8d4fc9" authors = ["Przemyslaw Szufel ", "Bartosz Pankratz ", "Anna Szczurek ", "Bogumil Kaminski ", "Pawel Pralat "] -version = "0.3.0" +version = "0.3.1" [deps] CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" diff --git a/src/routing.jl b/src/routing.jl index 07c6772..cb2f7ed 100644 --- a/src/routing.jl +++ b/src/routing.jl @@ -401,7 +401,7 @@ function generate_point_in_bounds(rng::AbstractRNG, m::MapData) end function generate_point_in_bounds(m::MapData) - generate_point_in_bounds(Random._GLOBAL_RNG, m) + generate_point_in_bounds(Random.GLOBAL_RNG, m) end diff --git a/test/runtests.jl b/test/runtests.jl index 11bb008..2c36abd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,6 +8,7 @@ import Graphs @testset "maps" begin @test length(m.nodes) == 9032 + @test eltype(generate_point_in_bounds(m)) <: Float64 rng = StableRNGs.StableRNG(1234) pA = generate_point_in_bounds(rng, m) @test all(isapprox.(pA,(39.52679926947162, -119.7400090256387)))