Merge pull request #131 from sparr/master

this fixes a bug with arc lengths as discussed on IRC, including two unit tests
This commit is contained in:
Alessandro Ranellucci 2011-12-22 03:16:16 -08:00
commit 1cc28844a5
2 changed files with 10 additions and 3 deletions

View file

@ -17,7 +17,11 @@ sub angle {
sub length {
my $self = shift;
return $self->radius * $self->angle;
if($self->orientation eq 'ccw') {
return $self->radius * $self->angle;
} else {
return $self->radius * (2*PI() - $self->angle);
}
}
1;