cartodb/config/initializers/float.rb
2021-01-24 16:18:54 +08:00

14 lines
220 B
Ruby

# coding: UTF-8
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