fix: idk, might work?
This commit is contained in:
parent
93c4ddb8ca
commit
b7b8ab0bce
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ use pyo3::{exceptions::PyValueError, prelude::*};
|
|||
|
||||
fn abs(v:i32, modulo:i32) -> i32 {
|
||||
if v < 0 {
|
||||
return modulo + (v % modulo);
|
||||
return (modulo + (v % modulo)) % modulo;
|
||||
} else {
|
||||
return v % modulo;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue