Commit e03ff5e7 authored by cutealien's avatar cutealien

Add dimension2d::operator- for completeness.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3325 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9e10006a
...@@ -106,6 +106,12 @@ namespace core ...@@ -106,6 +106,12 @@ namespace core
return *this; return *this;
} }
//! Add two dimensions
dimension2d<T> operator+(const dimension2d<T>& other) const
{
return dimension2d<T>(Width+other.Width, Height+other.Height);
}
//! Subtract a dimension from this one //! Subtract a dimension from this one
dimension2d<T>& operator-=(const dimension2d<T>& other) dimension2d<T>& operator-=(const dimension2d<T>& other)
{ {
...@@ -114,11 +120,10 @@ namespace core ...@@ -114,11 +120,10 @@ namespace core
return *this; return *this;
} }
//! Subtract one dimension from another
//! Add two dimensions dimension2d<T> operator-(const dimension2d<T>& other) const
dimension2d<T> operator+(const dimension2d<T>& other) const
{ {
return dimension2d<T>(Width+other.Width, Height+other.Height); return dimension2d<T>(Width-other.Width, Height-other.Height);
} }
//! Get area //! Get area
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment