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
282are used in place of things like =fmod= because they are282are used in place of things like =fmod= because they are
283less expensive.283less expensive.
284 284
285A note that the phase cannot be *exactly* 1, hence the
286greather than *or* equal to. (This mistake was figured out
287the hard way by the author).
288
285#+NAME: bounds_checking289#+NAME: bounds_checking
286#+BEGIN_SRC c290#+BEGIN_SRC c
287while (phs > 1) phs--;291while (phs >= 1) phs--;
288while (phs < 0) phs++;292while (phs < 0) phs++;
289#+END_SRC293#+END_SRC
290* Variation: external phase control294* 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