NAME
Compass::Bearing - Convert angle to text bearing (aka heading)
SYNOPSIS
use Compass::Bearing;
my $obj = Compass::Bearing->new();
print "Bearing: $_ deg => ", $obj->bearing($_), "\n" foreach (12,45,78,133);
print "Compass: ", join(":", $obj->data),"\n";
DESCRIPTION
CONSTRUCTOR
new
The new() constructor may be called with any parameter that is appropriate to the set method.
my $obj = Compass::Bearing->new();
METHODS
bearing
Method returns a text string based on bearing
my $bearing=$obj->bearing($degrees_from_north);
bearing_rad
Method returns a text string based on bearing
my $bearing=$obj->bearing_rad($radians_from_north);
set
Method sets and returns key for the bearing text data structure.
my $key=$self->set;
my $key=$self->set(1);
my $key=$self->set(2);
my $key=$self->set(3); #default value
data
Method returns an array of text values.
my $data=$self->data;
BUGS
Please send to the geo-perl email list.
AUTHOR
Michael R. Davis qw/perl michaelrdavis com/
LICENSE
Copyright (c) 2006 Michael R. Davis (mrdvt92)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.