Unified · Split
| @@ -282,9 +282,13 @@ that the phase is within the range 0 and 1. while loops · 281 unmodified lines | ||
| 282 | 282 | are used in place of things like =fmod= because they are |
| 283 | 283 | less expensive. |
| 284 | 284 | |
| 285 | +A note that the phase cannot be *exactly* 1, hence the | |
| 286 | +greather than *or* equal to. (This mistake was figured out | |
| 287 | +the hard way by the author). | |
| 288 | + | |
| 285 | 289 | #+NAME: bounds_checking |
| 286 | 290 | #+BEGIN_SRC c |
| 287 | −while (phs > 1) phs--; | |
| 291 | +while (phs >= 1) phs--; | |
| 288 | 292 | while (phs < 0) phs++; |
| 289 | 293 | #+END_SRC |
| 290 | 294 | * Variation: external phase control |