Modulo
Is there any other (more ellegant) way to find the modulo of a number (to be exact, to find if a number is dividable by X) than making something like that:
int &number = 632;
int &temp = &number / 3;
&temp = &temp * 3;
if (&temp == &number)
{
blahblah
}
...?
int &number = 632;
int &temp = &number / 3;
&temp = &temp * 3;
if (&temp == &number)
{
blahblah
}
...?
If you have Dink 1.08, here's the dinkc.chm entry for math_mod:
math_mod
Category: Math
Version: 1.08+
Prototype: int math_mod(int value, int divisor);
math_mod returns the remainder of value divided by divisor.
so:
int &crap = math_mod(632, 3)
if (&crap == 0)
{
//blahblah
}
math_mod
Category: Math
Version: 1.08+
Prototype: int math_mod(int value, int divisor);
math_mod returns the remainder of value divided by divisor.
so:
int &crap = math_mod(632, 3)
if (&crap == 0)
{
//blahblah
}