Commit 270aff11 authored by hybrid's avatar hybrid

Make multiplication const and add the proper op-assignments.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1029 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 56d40c3b
......@@ -39,12 +39,26 @@ namespace core
return *this;
}
dimension2d<T> operator/(const T& scale)
dimension2d<T>& operator/=(const T& scale)
{
Width /= scale;
Height /= scale;
return *this;
}
dimension2d<T> operator/(const T& scale) const
{
return dimension2d<T>(Width/scale, Height/scale);
}
dimension2d<T> operator*(const T& scale)
dimension2d<T>& operator*=(const T& scale)
{
Width *= scale;
Height *= scale;
return *this;
}
dimension2d<T> operator*(const T& scale) const
{
return dimension2d<T>(Width*scale, Height*scale);
}
......
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