Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this problem:

linesize = 20

counter % linesize == 1 // what does this line mean?
share|cite|improve this question
up vote 2 down vote accepted

It means the the variable counter is of the form $x.20 +1 (x \in \mathbb{N})$ or in other words, counter is One more than a multiple of 20 (21,41,61 etc.)

share|cite|improve this answer
    
One should be careful about this. If counter is negative then your statement is false, as most programming languages have the % operator return a result of the same sign as the first argument. – nullUser Jun 16 '12 at 14:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.