Skip to content

Commit

Permalink
restrict rand to -180:360 integers
Browse files Browse the repository at this point in the history
  • Loading branch information
milankl committed Oct 18, 2024
1 parent 1587415 commit c4f0361
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/geodesics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ end

# but integers always go to Float64 due to the trigonometric functions
for T in (Int16, Int32, Int64)
p1, p2 = (rand(T), rand(T)), (rand(T), rand(T))
d = -180:360 # sensible range for degrees
p1, p2 = T.(rand(d), rand(d)), T.(rand(d), rand(d))
@test typeof(spherical_distance(p1, p2)) == Float64
end
end

0 comments on commit c4f0361

Please sign in to comment.