Skip to content

Commit

Permalink
added isEqualTo feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tbhaxor committed Apr 4, 2018
1 parent dd0b46f commit 05e289a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/firefly
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,8 @@ float Vectors::areaOfParallelogramWith(Vectors v) {

float Vectors::areaOfTriangleWith(Vectors v) {
return this->areaOfParallelogramWith(v) / 2;
}

bool Vectors::isEqualTo(Vectors v) {
return this->vec == v.vec;
}
1 change: 1 addition & 0 deletions src/firefly.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Vectors {
Vectors crossProductWith(Vectors v);
float areaOfTriangleWith(Vectors v);
float areaOfParallelogramWith(Vectors v);
bool isEqualTo(Vectors v);
};

#endif

0 comments on commit 05e289a

Please sign in to comment.