Add operator/(wxSize, double)

For some reason, while both operator*(wxSize, double) and
wxSize::operator/=(double) existed, this one did not, which was
unexpected, so add it too.
This commit is contained in:
Vadim Zeitlin
2021-11-20 22:06:28 +01:00
parent 9941531efc
commit 2bbe126dca
3 changed files with 19 additions and 0 deletions

View File

@@ -435,6 +435,11 @@ inline wxSize operator*(unsigned long i, const wxSize& s)
return wxSize(int(s.x * i), int(s.y * i));
}
inline wxSize operator/(const wxSize& s, double i)
{
return wxSize(wxRound(s.x / i), wxRound(s.y / i));
}
inline wxSize operator*(const wxSize& s, double i)
{
return wxSize(wxRound(s.x * i), wxRound(s.y * i));