Compass::Points - Convert between compass point names, abbreviations and values
use Compass::Points; my $points = Compass::Points->new(); my $deg = $points->abbr2deg( "NNE" );
This module converts compass point names and abbreviations to degrees and vice versa. It supports four different compass point systems: 4, 8, 16 and 32. The default is 16 and can be used for wind compass usage.
Returns a Compass::Points object for the number of points (defaults to 16).
Takes a degree value and returns the corresponding abbreviation for the matching wind name.
Same as deg2abbr() but returns the full wind name.
Given a wind name abbreviation returns the degree of the points object.
Same as abbr2deg() but takes full wind names.
http://en.wikipedia.org/wiki/Points_of_the_compass
Simon Bertrang, <janus@cpan.org>
Copyright (C) 2014 by Simon Bertrang
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Compass::Points, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Compass::Points
CPAN shell
perl -MCPAN -e shell install Compass::Points
For more information on module installation, please visit the detailed CPAN module installation guide.