Last active
August 29, 2015 14:19
-
-
Save leifwalsh/ae55f34b030bdaf9657b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// omg | |
fn true_mod<T: Copy>(a: T, n: T) -> <<<T as ops::Rem>::Output as ops::Add<T>>::Output as ops::Rem<T>>::Output | |
where T: ops::Add + ops::Rem, | |
<T as ops::Rem>::Output: ops::Add<T>, | |
<<T as ops::Rem>::Output as ops::Add<T>>::Output: ops::Rem<T> | |
{ | |
(((a % n) + n) % n) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment