Modulo

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (note 'mod8', 'mod16' etc. (for search dest.))
m (note 'modulo operator' etc)
 
Line 1: Line 1:
 +
''"mod" redirects here. For the ''modulo operator'', see [[Operators#For_Numbers|here]]. For a [http://en.wikipedia.org/wiki/Modding modded] script, plugin, etc., search for that item by name.
 +
 +
 
A mathematical operation, defined as the remainder after an integer division.
 
A mathematical operation, defined as the remainder after an integer division.
  

Latest revision as of 17:51, 20 December 2015

"mod" redirects here. For the modulo operator, see here. For a modded script, plugin, etc., search for that item by name.


A mathematical operation, defined as the remainder after an integer division.

Thus a mod b = 'the smallest positive remainder of a' after subtracting as many times b as possible.

Examples:

15 mod 4 = 3 since 15-3*4 = 3
42 mod 9 = 6 since 42-4*9 = 6
15 mod 5 = 0 since 15-3*5 = 0, etc ...

In image processing, to say that a resolution is mod 16 means that the both the width and height are a multiple of 16, i.e. width mod 16 = 0 and height mod 16 = 0.

Sometimes written as 'mod8', 'mod16' etc.

Personal tools