Skewworks and I were troubleshooting some issues I was having with my geo distance calculations, when Skew noticed something interesting. The cause of the problems was the fact that Elze didn’t define PI properly in his lib!
Replace line 45 with
public static readonly double PI = 3.1415926535897931F;
… and the issue should be fixed.
It might also be worth checking the other constants in the lib, as well.
Elze, if you are reading this, no hard feelings or anything! Little mistake, but I wanted people to be aware of it to avoid further confusion.
Not really at the moment, no. I was using it for my Geo libs because I wanted to see the code behind the methods, and I also wanted to create something that would be cross compatible with other NETMF boards. I’ll also have target specific versions in the end.
A double will store the value of Pi far more accurately than float will (twice as accurately actually hehe… since it’s a Double over a Single). The F at the end should be a D though…