Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `arctan' for Math:Module #2

Open
madleech opened this issue Jun 30, 2020 · 0 comments
Open

NoMethodError: undefined method `arctan' for Math:Module #2

madleech opened this issue Jun 30, 2020 · 0 comments

Comments

@madleech
Copy link

[1] pry(main)> a = Geospatial::Tiles.new(nil)
=> #<Geospatial::Tiles:0x000055e0899fc508 @box=nil, @zoom=5>
[2] pry(main)> a.unmap(3414, 2282, 12)
NoMethodError: undefined method `arctan' for Math:Module
Did you mean?  atan
from /home/michael/.rvm/gems/ruby-2.6.5/gems/geospatial-1.14.1/lib/geospatial/tiles.rb:49:in `unmap'

Also the unmap method should really convert the inputs to floats:

[2] pry(main)> a.unmap(3414, 2282, 12)
=> [-180.0, -20.13847031245115]

[3] pry(main)> a.unmap(3414.0, 2282.0, 12)
=> [120.05859375, -20.13847031245115]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant