NAME
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>
SYNOPSIS
use Geo::Compass::Direction qw(direction);
my $dir;
$dir = direction(0); # N
$dir = direction(327); # NNW
$dir = direction(180.235323411); # S
DESCRIPTION
Converts a compass heading degree into human readable direction (eg: N
, SSW
)
EXPORT_OK
This module exports only a single function, <direction()
>, and it must be imported explicitly.
FUNCTIONS
direction($degree)
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
).
Returns: String. The letter designation of the heading.
AUTHOR
Steve Bertrand, <steveb at cpan.org>
LICENSE AND COPYRIGHT
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: