diff options
author | 積丹尼 Dan Jacobson <jidanni@jidanni.org> | 2023-02-24 15:34:46 +0800 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2023-03-01 09:46:50 +1100 |
commit | e15e200786b11858b8b4d82e91f6a3eeed934f15 (patch) | |
tree | c6b23c16e7fc26dfb79c53043af32a3b6711ec00 /dist | |
parent | 504d203b2761303e5fba6cae79e35710d0618276 (diff) | |
download | perl-e15e200786b11858b8b4d82e91f6a3eeed934f15.tar.gz |
Math::Trig: make the great_circle_midpoint() example more complete
Yes, "or about 69 N 89 E, in the frozen wastes of Siberia."
but must reveal the crucial missing step involved!
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Math-Complex/lib/Math/Trig.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dist/Math-Complex/lib/Math/Trig.pm b/dist/Math-Complex/lib/Math/Trig.pm index fbcb973259..5745ae14d8 100644 --- 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. |