Changeset 815 for libcaca/trunk/test/dithering.c
 Timestamp:
 Apr 18, 2006, 6:17:14 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libcaca/trunk/test/dithering.c
r813 r815 55 55 /* distance to 40% */ 56 56 dist = XRATIO * (x  40) * (x  40) + YRATIO * y * y; 57 if(cucul_rand(FUZZY, FUZZY ) + dist < dista)57 if(cucul_rand(FUZZY, FUZZY+1) + dist < dista) 58 58 { 59 59 nearb = neara; distb = dista; neara = 1; dista = dist; … … 66 66 /* check dist to 70% */ 67 67 dist = XRATIO * (x  70) * (x  70) + YRATIO * y * y; 68 if(cucul_rand(FUZZY, FUZZY ) + dist < dista)68 if(cucul_rand(FUZZY, FUZZY+1) + dist < dista) 69 69 { 70 70 nearb = neara; distb = dista; neara = 2; dista = dist; 71 71 } 72 else if(cucul_rand(FUZZY, FUZZY ) + dist < distb)72 else if(cucul_rand(FUZZY, FUZZY+1) + dist < distb) 73 73 { 74 74 nearb = 2; distb = dist; … … 77 77 /* check dist to white */ 78 78 dist = XRATIO * (x  100) * (x  100) + YRATIO * y * y; 79 if(cucul_rand(FUZZY, FUZZY ) + dist < dista)79 if(cucul_rand(FUZZY, FUZZY+1) + dist < dista) 80 80 { 81 81 nearb = neara; distb = dista; neara = 3; dista = dist; 82 82 } 83 else if(cucul_rand(FUZZY, FUZZY ) + dist < distb)83 else if(cucul_rand(FUZZY, FUZZY+1) + dist < distb) 84 84 { 85 85 nearb = 3; distb = dist; … … 90 90 dist = XRATIO * (x  40) * (x  40) + YRATIO * (y  100) * (y  100); 91 91 dist = dist * 12 / 16; 92 if(cucul_rand(FUZZY, FUZZY ) + dist < dista)92 if(cucul_rand(FUZZY, FUZZY+1) + dist < dista) 93 93 { 94 94 nearb = neara; distb = dista; neara = 4; dista = dist; 95 95 } 96 else if(cucul_rand(FUZZY, FUZZY ) + dist < distb)96 else if(cucul_rand(FUZZY, FUZZY+1) + dist < distb) 97 97 { 98 98 nearb = 4; distb = dist; … … 102 102 dist = XRATIO * (x  100) * (x  100) + YRATIO * (y  100) * (y  100); 103 103 dist = dist * 8 / 16; 104 if(cucul_rand(FUZZY, FUZZY ) + dist < dista)104 if(cucul_rand(FUZZY, FUZZY+1) + dist < dista) 105 105 { 106 106 nearb = neara; distb = dista; neara = 5; dista = dist; 107 107 } 108 else if(cucul_rand(FUZZY, FUZZY ) + dist < distb)108 else if(cucul_rand(FUZZY, FUZZY+1) + dist < distb) 109 109 { 110 110 nearb = 5; distb = dist;
Note: See TracChangeset
for help on using the changeset viewer.