LCOV - code coverage report
Current view: top level - great_circle_distance-0.0.6/lib/src/formula - harvesine.dart (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 0 6 0.0 %
Date: 2017-10-10 20:17:03 Functions: 0 0 -

          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