Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit c192d5a

Browse files
committed
Add Twist equals method
1 parent 91c8c24 commit c192d5a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/kylecorry/geometry/Twist.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@ public Twist(Vector3 linear, Vector3 angular) {
1616
this.linear = linear;
1717
this.angular = angular;
1818
}
19+
20+
@Override
21+
public boolean equals(Object obj) {
22+
if (obj == null || !(obj instanceof Twist))
23+
return false;
24+
Twist other = (Twist) obj;
25+
return other.linear.equals(linear) && other.angular.equals(angular);
26+
}
1927
}

0 commit comments

Comments
 (0)