(svn r9052) [gamebalance] -Add: Unary minus operator for FixedT gamebalance
authorcelestar
Wed, 07 Mar 2007 14:36:57 +0000
branchgamebalance
changeset 9877 29bb0e8924b7
parent 9876 f8302fbd236d
child 9878 98be05df31ef
(svn r9052) [gamebalance] -Add: Unary minus operator for FixedT
src/fixedt.h
--- a/src/fixedt.h	Tue Mar 06 15:30:54 2007 +0000
+++ b/src/fixedt.h	Wed Mar 07 14:36:57 2007 +0000
@@ -292,6 +292,11 @@
 	}
 
 	/**
+	 * Unary minus operator
+	 */
+	FixedT operator -() const { return Raw(-Raw::m_data); }
+
+	/**
 	 * Stream operator, used for floating point output
 	 * @param os    The stream we are going to write to
 	 * @param value The Fixed-point variable we want to write in the stream