Skip Menu |

This queue is for tickets about the Math-Complex CPAN distribution.

Report information
The Basics
Id: 123108
Status: new
Priority: 0/
Queue: Math-Complex

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.59
Fixed in: (no value)



Subject: [PATCH] Give angle from London in degrees too
The example needs to output degrees also. Because: 1. Initial input was in degrees, not radians. 2. Nobody uses radian when discussing geography. Only degrees. --- /usr/share/perl/5.26.0/Math/Trig.pm 2017-09-12 23:07:07.000000000 +0800 +++ /tmp/Trig.pm 2017-09-22 19:46:00.234885768 +0800 @@ -660,9 +660,10 @@ The direction you would have to go from London to Tokyo (in radians, straight north being zero, straight east being pi/2). - use Math::Trig qw(great_circle_direction); + use Math::Trig qw(great_circle_direction rad2deg); my $rad = great_circle_direction(@L, @T); # About 0.547 or 0.174 pi. + my $deg = rad2deg($rad); # 31.32 degrees east of north. The midpoint between London and Tokyo being