Commit 5586a8b9 authored by Colomban Wendling's avatar Colomban Wendling

LibOVCC: Simplify the Utils.clock_mod() implementation

parent 6544bd9c
......@@ -23,11 +23,7 @@ namespace OVCC.Utils
public inline uint clock_mod (int x,
uint mod)
{
if (x < 0) {
return (mod - ((uint)(-x) % mod)) % mod;
} else {
return (uint)x % mod;
}
return ((x % mod) + mod) % mod;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment