Skip to content

Commit

Permalink
start new signing mechanism from #46
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-h committed Jun 20, 2022
1 parent 1e83297 commit 882a303
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/geojson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ abstract class GeoJSONObject {

/// Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
abstract class CoordinateType implements Iterable<num> {
final bool isSigned;
final List<num> _items;

CoordinateType(List<num> list) : _items = List.of(list, growable: false);
CoordinateType(
List<num> list,
this.isSigned,
) : _items = List.of(list, growable: false);

@override
num get first => _items.first;
Expand Down Expand Up @@ -180,7 +184,7 @@ abstract class CoordinateType implements Iterable<num> {

CoordinateType toSigned();

bool get isSigned;
CoordinateType toUnsigned();

_untilSigned(val, limit) {
if (val > limit) {
Expand Down

0 comments on commit 882a303

Please sign in to comment.