LCOV - code coverage report
Current view: top level - great_circle_distance-0.0.6/lib/src/formula - spherical_lawofcosines.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 Spherical_LawOfCosines {
       4             :     static double distance(double lat1, lon1, lat2, lon2) {
       5           0 :         double distance = acos(
       6           0 :             sin(lat1) * sin(lat2) +
       7           0 :             cos(lat1) * cos(lat2) *
       8           0 :             cos(lon2 - lon1)
       9             :         );
      10           0 :         if (distance < 0) distance = distance + PI;
      11             : 
      12             :         var EarthRadius = 6378137.0; // WGS84 major axis
      13           0 :         return EarthRadius * distance;
      14             :     }
      15             : }

Generated by: LCOV version 1.13