Modulo operators for sf::Time (fixes #429)

This commit is contained in:
Foaly 2013-07-17 12:24:24 +02:00
parent b3357eed2a
commit 0c0b3c2a3a
2 changed files with 37 additions and 1 deletions

View file

@ -236,4 +236,16 @@ Time& operator /=(Time& left, Int64 right)
return left = left / right;
}
////////////////////////////////////////////////////////////
Time operator %(Time left, Time right)
{
return microseconds(left.asMicroseconds() % right.asMicroseconds());
}
////////////////////////////////////////////////////////////
Time& operator %=(Time& left, Time right)
{
return left = left % right;
}
} // namespace sf