| GIS-Distance-Fast documentation | Contained in the GIS-Distance-Fast distribution. |
GIS::Distance::Formula::Haversine::Fast - C implementation of GIS::Distance::Formula::Haversine.
This module is used by GIS::Distance and has the same API as GIS::Distance::Formula::Haversine.
Aran Clary Deltac <bluefeet@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| GIS-Distance-Fast documentation | Contained in the GIS-Distance-Fast distribution. |
package GIS::Distance::Formula::Haversine::Fast;
use Any::Moose; extends 'GIS::Distance::Formula::Haversine'; use GIS::Distance::Fast; use Class::Measure::Length qw( length ); sub distance { my $self = shift; my $c = GIS::Distance::Fast::haversine_distance( @_ ); return length( $self->kilometer_rho() * $c, 'km' ); } 1;