mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 12:46:03 +00:00
UConv.pm: flexible roundings for distance()
git-svn-id: https://svn.fhem.de/fhem/trunk@17574 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
87c8104e2b
commit
a5a895a4c9
@ -705,7 +705,8 @@ sub mph2bft($) {
|
||||
|
||||
sub distance($$$$;$$) {
|
||||
my ( $lat1, $lng1, $lat2, $lng2, $rnd, $unit ) = @_;
|
||||
return "0.0" if ( $lat1 eq $lat2 && $lng1 eq $lng2 );
|
||||
return _round( "0.000000000", $rnd )
|
||||
if ( $lat1 eq $lat2 && $lng1 eq $lng2 );
|
||||
|
||||
use constant M_PI => 4 * atan2( 1, 1 );
|
||||
my $pi80 = M_PI / 180;
|
||||
|
Loading…
x
Reference in New Issue
Block a user