LCOV - code coverage report | ||||||||||||||||||||||
![]() | ||||||||||||||||||||||
|
||||||||||||||||||||||
![]() |
Line data Source code 1 : import 'dart:math'; 2 : 3 : class Haversine { 4 : static double distance(double lat1, lon1, lat2, lon2) { 5 : var EarthRadius = 6378137.0; // WGS84 major axis 6 0 : double distance = 2 * EarthRadius * asin( 7 0 : sqrt( 8 0 : pow(sin(lat2 - lat1) / 2, 2) 9 0 : + cos(lat1) 10 0 : * cos(lat2) 11 0 : * pow(sin(lon2 - lon1) / 2, 2) 12 : ) 13 : ); 14 : return distance; 15 : } 16 : } |
![]() |
Generated by: LCOV version 1.13 |