|
From: <axl...@us...> - 2010-04-27 18:16:57
|
Revision: 704
http://hgengine.svn.sourceforge.net/hgengine/?rev=704&view=rev
Author: axlecrusher
Date: 2010-04-27 18:16:51 +0000 (Tue, 27 Apr 2010)
Log Message:
-----------
const reference
Modified Paths:
--------------
Mercury2/src/MQuaternion.cpp
Modified: Mercury2/src/MQuaternion.cpp
===================================================================
--- Mercury2/src/MQuaternion.cpp 2010-04-27 18:16:10 UTC (rev 703)
+++ Mercury2/src/MQuaternion.cpp 2010-04-27 18:16:51 UTC (rev 704)
@@ -275,7 +275,7 @@
}
//Returns the Euclidian Outer Product of two MQuaternions
-MercuryVertex outerProduct(MQuaternion a,MQuaternion b)
+MercuryVertex outerProduct(const MQuaternion& a, const MQuaternion& b)
{
MercuryVertex result;
result[0] = (a.m_wxyz[0]*b.m_wxyz[1])-(a.m_wxyz[1]*b.m_wxyz[0])-(a.m_wxyz[2]*b.m_wxyz[3])+(a.m_wxyz[3]*b.m_wxyz[2]);
@@ -285,7 +285,7 @@
}
//Returns the Even Product of two MQuaternions
-MQuaternion evenProduct(MQuaternion a,MQuaternion b) {
+MQuaternion evenProduct(const MQuaternion& a, const MQuaternion& b) {
MQuaternion result;
result.m_wxyz[0] = (a.m_wxyz[0]*b.m_wxyz[0])-(a.m_wxyz[1]*b.m_wxyz[1])-(a.m_wxyz[2]*b.m_wxyz[2])-(a.m_wxyz[3]*b.m_wxyz[3]);
result.m_wxyz[1] = (a.m_wxyz[0]*b.m_wxyz[1])+(a.m_wxyz[1]*b.m_wxyz[0]);
@@ -295,7 +295,7 @@
}
//Returns the Odd Product of two MQuaternions (Similar to Vector Cross-Product)
-MercuryVertex oddProduct(MQuaternion a,MQuaternion b) {
+MercuryVertex oddProduct(const MQuaternion& a, const MQuaternion& b) {
MercuryVertex result;
result[0] = (a.m_wxyz[2]*b.m_wxyz[3])-(a.m_wxyz[3]*b.m_wxyz[2]);
result[1] = (a.m_wxyz[3]*b.m_wxyz[1])-(a.m_wxyz[1]*b.m_wxyz[3]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|