The Dink Network

Reply to Re: Modulo

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 11th 2006, 01:59 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
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
}