This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
504d203
)
Math::Trig: make the great_circle_midpoint() example more complete
author
積丹尼 Dan Jacobson
<jidanni@jidanni.org>
Fri, 24 Feb 2023 07:34:46 +0000
(15:34 +0800)
committer
Tony Cook
<tony@develop-help.com>
Tue, 28 Feb 2023 22:46:50 +0000
(09:46 +1100)
Yes, "or about 69 N 89 E, in the frozen wastes of Siberia."
but must reveal the crucial missing step involved!
dist/Math-Complex/lib/Math/Trig.pm
patch
|
blob
|
blame
|
history
diff --git
a/dist/Math-Complex/lib/Math/Trig.pm
b/dist/Math-Complex/lib/Math/Trig.pm
index
fbcb973
..
5745ae1
100644
(file)
--- a/
dist/Math-Complex/lib/Math/Trig.pm
+++ b/
dist/Math-Complex/lib/Math/Trig.pm
@@
-669,9
+669,11
@@
straight north being zero, straight east being pi/2).
The midpoint between London and Tokyo being
- use Math::Trig qw(great_circle_midpoint);
+ use Math::Trig qw(great_circle_midpoint
rad2deg
);
my @M = great_circle_midpoint(@L, @T);
+ sub SWNE { rad2deg( $_[0] ), 90 - rad2deg( $_[1] ) }
+ my @lonlat = SWNE(@M);
or about 69 N 89 E, in the frozen wastes of Siberia.