Geo::Compass::Direction - Convert a compass heading degree into human readable direction
<a href="http://travis-ci.com/stevieb9/geo-compass-direction"><img src="https://www.travis-ci.com/stevieb9/geo-compass-direction.svg?branch=master"/> <a href='https://coveralls.io/github/stevieb9/geo-compass-direction?branch=master'><img src='https://coveralls.io/repos/stevieb9/geo-compass-direction/badge.svg?branch=master&service=github' alt='Coverage Status' /></a>
use Geo::Compass::Direction qw(direction); my $dir; $dir = direction(0); # N $dir = direction(327); # NNW $dir = direction(180.235323411); # S
Converts a compass heading degree into human readable direction (eg: N, SSW)
N
SSW
This module exports only a single function, <direction()>, and it must be imported explicitly.
<direction()
Convert a compass heading degree into human readable format.
Parameters:
$degree
Mandatory, Int|Float: The compass degree to use for the conversion. Can be an integer (eg 360) or a float (eg 179.12352211).
360
179.12352211
Returns: String. The letter designation of the heading.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2020 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
To install Geo::Compass::Direction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Compass::Direction
CPAN shell
perl -MCPAN -e shell install Geo::Compass::Direction
For more information on module installation, please visit the detailed CPAN module installation guide.