| Subject: | Re: need help with arrays |
|---|---|
| From: | pereges |
| Date: | Tue, 29 Apr 2008 10:34:43 -0700 PDT |
| Newsgroups: | comp.lang.c |
Ok solved. float xsize = xlength / (numpointsx - 1); float ysize = ylength / (numpointsy - 1); and use <= in both loops. With this approach, now i have extra points: For eg. numpoints = 14000 //entered by user actual numpoints = 14161 //161 extra xmax = 10.170940 ( > actual xmax) ymax = 10.170940 ( > actual ymax) but i don't mind really what i will do is that i am doing actual calculations, i will simply not consider points where: x > xmax || y > ymax x or y cannot be less than xmin, ymin anyway |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: C is best, Richard Tobin |
|---|---|
| Next by Date: | Re: K&R2 , exercise 7.6, Default User |
| Previous by Thread: | Re: need help with arrays, pereges |
| Next by Thread: | Re: need help with arrays, Ben Bacarisse |
| Indexes: | [Date] [Thread] [Top] [All Lists] |