Add equality comparator to geometry classes (#1882)

This commit is contained in:
Prateek Machiraju
2019-09-08 14:20:26 -04:00
committed by Peter Johnson
parent 62f07c182c
commit 86b666bba9
26 changed files with 341 additions and 10 deletions

View File

@@ -180,6 +180,22 @@ class Translation2d {
*/
Translation2d operator/(double scalar) const;
/**
* Checks equality between this Translation2d and another object.
*
* @param other The other object.
* @return Whether the two objects are equal.
*/
bool operator==(const Translation2d& other) const;
/**
* Checks inequality between this Translation2d and another object.
*
* @param other The other object.
* @return Whether the two objects are not equal.
*/
bool operator!=(const Translation2d& other) const;
/*
* Divides the current translation by a scalar.
*