The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Geo::Compass::Direction - Convert a compass heading degree into human readable direction

Coverage Status

SYNOPSIS

    use Geo::Compass::Direction qw(direction);

    print direction(0);              # N
    print direction(327);            # NNW
    print 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.

SEE ALSO

Compass::Bearing, Compass::Points

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:

http://www.perlfoundation.org/artistic_license_2_0