Modulo operators for sf::Time (fixes #429)
This commit is contained in:
parent
b3357eed2a
commit
0c0b3c2a3a
2 changed files with 37 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue