Browse Source

Introduce PointOf operator /=

pull/6458/head
obligaron 3 years ago committed by Anders Jenbo
parent
commit
ac7c96b33f
  1. 7
      Source/engine/point.hpp

7
Source/engine/point.hpp

@ -88,6 +88,13 @@ struct PointOf {
return *this; return *this;
} }
constexpr PointOf<CoordT> &operator/=(const int factor)
{
x /= factor;
y /= factor;
return *this;
}
constexpr PointOf<CoordT> operator-() const constexpr PointOf<CoordT> operator-() const
{ {
static_assert(std::is_signed<CoordT>::value, "CoordT must be signed"); static_assert(std::is_signed<CoordT>::value, "CoordT must be signed");

Loading…
Cancel
Save