mod only works on int
This commit is contained in:
parent
dd736f341f
commit
863db5467b
|
@ -20,12 +20,7 @@
|
|||
|
||||
namespace sb
|
||||
{
|
||||
/* Modulus that handles negative and float arguments */
|
||||
template<typename Number>
|
||||
Number mod(Number a, Number b)
|
||||
{
|
||||
return (b + (a % b)) % b;
|
||||
}
|
||||
int mod(int a, int b);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue