Rev 7 | Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 7 | Rev 8 | ||
|---|---|---|---|
| Line 105... | Line 105... | ||
| 105 | return 0; |
105 | return 0; |
| 106 | } |
106 | } |
| 107 | // check upper bounds |
107 | // check upper bounds |
| 108 | // find the upper boundary by looking for non -1 points |
108 | // find the upper boundary by looking for non -1 points |
| 109 | int upper = size - 1; |
109 | int upper = size - 1; |
| 110 | while (curve[upper] == NO_DATA) |
110 | while (upper != 0 && curve[upper] == NO_DATA) |
| 111 | upper--; |
111 | upper--; |
| 112 | 112 | ||
| 113 | if (point >= curve[upper]) |
113 | if (point >= curve[upper]) |
| 114 | { |
114 | { |
| 115 | *frac = 0; |
115 | *frac = 0; |