Skip to content

Commit

Permalink
fix(geobase): fix Ellipsoid toString, equality and hashCode #256
Browse files Browse the repository at this point in the history
  • Loading branch information
navispatial committed Jan 1, 2025
1 parent 1a94491 commit a5cade8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dart/geobase/lib/src/common/reference/ellipsoid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,19 @@ class Ellipsoid {

@override
String toString() {
return '$a,$b,$f';
return '$id;$name;$a;$b;$f';
}

@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is Ellipsoid && a == other.a && b == other.b && f == other.f);
(other is Ellipsoid &&
id == other.id &&
name == other.name &&
a == other.a &&
b == other.b &&
f == other.f);

@override
int get hashCode => Object.hash(a, b, f);
int get hashCode => Object.hash(id, name, a, b, f);
}

0 comments on commit a5cade8

Please sign in to comment.