cartodb-4.29/config/initializers/float.rb
2020-06-15 10:58:47 +08:00

12 lines
203 B
Ruby

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