History

oscf: correction to make sure phasor range is never exactly 1

Paul Batchelor committed 6 years ago

Commit 93a494d1 parent ce55cc91 file · +5 −1Browse files

Unified · Split

oscf.org+5−1
@@ -282,9 +282,13 @@ that the phase is within the range 0 and 1. while loops · 281 unmodified lines
282282 are used in place of things like =fmod= because they are
283283 less expensive.
284284
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+
285289 #+NAME: bounds_checking
286290 #+BEGIN_SRC c
287−while (phs > 1) phs--;
291+while (phs >= 1) phs--;
288292 while (phs < 0) phs++;
289293 #+END_SRC
290294 * Variation: external phase control

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t