Geo::Compass::Direction - Convert a compass heading degree into human readable direction
use Geo::Compass::Direction qw(direction); print direction(0); # N print direction(327); # NNW print 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.
Compass::Bearing, Compass::Points
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.