8 lines
130 B
C++
8 lines
130 B
C++
|
#include "utility.hpp"
|
||
|
|
||
|
/* Modulus that handles negative arguments */
|
||
|
int sb::mod(int a, int b)
|
||
|
{
|
||
|
return (b + (a % b)) % b;
|
||
|
}
|