summaryrefslogtreecommitdiffstats
path: root/src/math/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/vector.h')
-rw-r--r--src/math/vector.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/math/vector.h b/src/math/vector.h
index e8feca6..d8c5511 100644
--- a/src/math/vector.h
+++ b/src/math/vector.h
@@ -59,6 +59,8 @@ namespace Math
All methods are made inline to maximize optimization.
+ TODO test
+
*/
struct Vector
{
@@ -150,4 +152,18 @@ struct Vector
}
};
+//! Convenience function for calculating dot product
+float DotProduct(const Vector &left, const Vector &right)
+{
+ return left.DotProduct(right);
+}
+
+//! Convenience function for calculating cross product
+Vector CrossProduct(const Vector &left, const Vector &right)
+{
+ Vector result = left;
+ result.CrossProduct(right);
+ return result;
+}
+
}; // namespace Math