Bug#697566: great_circle_waypoint $way need not be 0..1; add example

jidanni at jidanni.org jidanni at jidanni.org
Mon Jan 7 00:16:47 UTC 2013


Package: perl-doc
Version: 5.14.2-16
Severity: wishlist
File: /usr/share/man/man3/Math::Trig.3perl.gz

Regarding
   great_circle_waypoint
         use Math::Trig 'great_circle_waypoint';

         ($thetai, $phii) =
           great_circle_waypoint($theta0, $phi0, $theta1, $phi1, $way);

       Where the $way is a value from zero ($theta0, $phi0) to one ($theta1,
       $phi1).  Note that antipodal points (where their distance is pi
       radians) do not have waypoints between them (they would have an an
       "equator" between them), and therefore "undef" is returned for
       antipodal points.  If the points are the same and the distance
       therefore zero and all waypoints therefore identical, the first point
       (either point) is returned.


Please note this should be modified to mention
1) have no waypoints: you mean instead of being able to return one
waypoint, there is instead an infinite number of waypoints that could be
returned.
2) zero to one: However one can use any number positive or negative.
(And the man page doesn't even have an example for
great_circle_waypoint, so perhaps use:)

"Let's go from London to Tokyo, and not stop there but instead continue
on to see where double the distance will take us:"

sub unNESW { rad2deg( $_[0] ), 90 - rad2deg( $_[1] ) }
print "$_\n" for unNESW great_circle_waypoint @L, @T, 2;

174 E 45 S near New Zealand.




More information about the Perl-maintainers mailing list