summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mod.m
blob: 21167e56d764db52db15d6cdf0245008728f4425 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% M = mod(A,B)
% 
% Modulus operator: returns A mod B.
% Works on matrics, vectors or scalars.
% 
% NOTE: This function is a Matlab-5 builtin, but was missing from Matlab-4.

% Eero Simoncelli, 7/96.

function m = mod(a,n)

m = a - n .* floor(a./n);
return;