Another way to explain the modulus operator is like this, in a not-so-decent coding method:
Code:
function get_remainder(number, value)
{
temp = int(number/value);
return(number-value*time);
}
function another_function(parameters)
{
some_var = 160;
// ... more code above here
some_var = get_remainder(some_var, 30); // returns 10 and the same as
// some_var %= 30; // also returns 10
// ... more code below here
}
Although code like this is meaningless, this is the basic algorithm behind it - it's not all that complex either.