Mercurial > hg > ishara
view signals/private/unify.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 289445d368a7 |
children |
line wrap: on
line source
% this is weird but it works % nan means variable, so max(nan,x)=x % inf means failure so max(inf,x)=inf function z=unify(x,y) if ~isfinite(x) || ~isfinite(y), z=max(x,y); elseif x==y, z=x; else z=inf; end end