cartodb-4.42/config/initializers/float.rb

12 lines
203 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
class Float
def self.random_latitude
rand(40) * [1,-1][rand(2)] + (rand(10000.0) / 1000.0)
end
def self.random_longitude
rand(3) * [1,-1][rand(2)] + (rand(10000.0) / 1000.0)
end
end