rspatial / geosphere

R geosphere package
GNU General Public License v3.0
34 stars 7 forks source link

bearing() seems to be insensitive to f #11

Open RobinHankin opened 1 year ago

RobinHankin commented 1 year ago

Hi there, just a note to thank you for the excellent geosphere package, which I am making extensive use of.

And while I'm writing, I've noticed that function bearing() seems to be insensitive to the value of f, version 1.5-18:

> dput(bearing(c(10,10),c(20,20)))
42.9929548882692
> dput(bearing(c(10,10),c(20,20),f=0))
42.9929548882692
> dput(bearing(c(10,10),c(20,20),f=1e99))
42.9929548882692
> dput(bearing(c(10,10),c(20,20),f=Inf))
42.9929548882692
> dput(bearing(c(10,10),c(20,20),f=-Inf))
42.9929548882692
> 

Not sure if I am misunderstanding something here, can you advise?