Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-03-04 16:06:09 +0000
committerStijn Buys <ingar@osirion.org>2012-03-04 16:06:09 +0000
commit4881ebb6162bde6658431f5723c16576aa2b55bb (patch)
tree9d45080feee096a7c485e83fb37e1a9886a0618e /src/math/vector3f.h
parent8fbb2425220389ee69749ccd93407a0db73678fd (diff)
Added comparison operators to math:Vector3f.
Diffstat (limited to 'src/math/vector3f.h')
-rw-r--r--src/math/vector3f.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/math/vector3f.h b/src/math/vector3f.h
index 2ff4ba0..24a7610 100644
--- a/src/math/vector3f.h
+++ b/src/math/vector3f.h
@@ -39,7 +39,26 @@ public:
/// destructor
~Vector3f();
-
+
+ /**
+ * @brief comparison
+ * */
+ bool equals(const Vector3f &other) const;
+
+ /**
+ * @brief equality operator
+ * */
+ inline bool operator==(const Vector3f &other) const {
+ return (equals(other));
+ }
+
+ /**
+ * @brief inequality operator
+ * */
+ inline bool operator!=(const Vector3f &other) const {
+ return (!equals(other));
+ }
+
/* -- Assignment operators -- */
/// assign (0, 0, 0)
void clear();
@@ -98,9 +117,6 @@ public:
return v;
}
- /// comparison operator
- bool operator==(const Vector3f &other) const;
-
/// assign a value to an element of this vector
/*! range is not checked
* @param index the index of the element to assign to ( 0 <= index < 3 )