Dec 17, 2001 | TRIZ | Slide 17 |
Replace multiplication and division with addition and subtraction.
1 ylen = (yend - ystart); 2 b = (xend - xstart); 3 y = ystart; 4 for (x = xstart; x < xend; x++) { 5 t += ylen; 6 if (t > b) { 7 t -= b; 8 y++; 9 } 10 plot (x, y); 11 } |
![]() |
Next | ![]() |
Copyright © 2001, David Turner |