Merge pull request #430 from Foaly/timeOperators
Added modulo operators for sf::Time (#429)
This commit is contained in:
commit
a7f7c57a72
2 changed files with 39 additions and 1 deletions
|
@ -236,4 +236,18 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue