Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit a69321e

Browse files
committed
#90574: Moves comment about implementation detail from the documentation coming into the implementation
1 parent eeb0dd5 commit a69321e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/location.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ class LatLng {
1414
/// The latitude is clamped to the inclusive interval from -90.0 to +90.0.
1515
///
1616
/// The longitude is normalized to the half-open interval from -180.0
17-
/// (inclusive) to +180.0 (exclusive). Avoids normalization if possible to
18-
/// avoid unnecessary loss of precision
17+
/// (inclusive) to +180.0 (exclusive).
1918
const LatLng(double latitude, double longitude)
2019
: assert(latitude != null),
2120
assert(longitude != null),
2221
latitude =
2322
(latitude < -90.0 ? -90.0 : (90.0 < latitude ? 90.0 : latitude)),
23+
// Avoids normalization if possible to prevent unnecessary loss of precision
2424
longitude = longitude >= -180 && longitude < 180
2525
? longitude
2626
: (longitude + 180.0) % 360.0 - 180.0;

packages/google_maps_flutter/google_maps_flutter_platform_interface/test/types/location_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() {
99
TestWidgetsFlutterBinding.ensureInitialized();
1010

1111
group('LanLng constructor', () {
12-
test('Maintains longitude precision if within acceptable range', () async {
12+
test('Maintains longitude precision if within acceptable range', () async {
1313
const lat = -34.509981;
1414
const lng = 150.792384;
1515

0 commit comments

Comments
 (0)