On 1/20/19 1:28 PM, faissaloo wrote:
In Python -1%3 == 2 however in D -1%3 == -1Is there a standard library function or something that gives me the Python version of modulo?
Hm... (n%3+3)%3 should work. -Steve
Steven Schveighoffer via Digitalmars-d-learn Sun, 20 Jan 2019 10:56:26 -0800
On 1/20/19 1:28 PM, faissaloo wrote:
In Python -1%3 == 2 however in D -1%3 == -1Is there a standard library function or something that gives me the Python version of modulo?
Hm... (n%3+3)%3 should work. -Steve