Sha256: 09b9868602bc212e17631037f97f930c407584e559545c5ef094e0cb9bb0c5bf
Contents?: true
Size: 466 Bytes
Versions: 2
Compression:
Stored size: 466 Bytes
Contents
module Pokeplot module Helpers class Math class << self def deg_to_rad(deg) return deg * (::Math::PI / 180) end def get_earth_radius(lat) earth_radius_max = 6378137.0 earth_radius_min = 6356752.3 latrad = deg_to_rad(lat) return (1.0/(((::Math.cos(latrad))/earth_radius_max)**(2) + ((::Math.sin(latrad))/earth_radius_min)**(2)))**(1.0/2) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pokeplot-0.2.1beta | lib/pokeplot/helpers/math.rb |
pokeplot-0.2.0beta | lib/pokeplot/helpers/math.rb |