summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index e4564c6..22f63e6 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -147,9 +147,11 @@ int main(int argc, char* argv[]) {
Real C₀ = Cₜ₊₁[0];
+ bool trigger = false;
for (unsigned i = 0; i < N; i++) {
- if (Cₜ₊₁[i] < 0) {
+ if (Cₜ₊₁[i] < 0 || trigger) {
Cₜ₊₁[i] = 0;
+ trigger = true;
}
if (Cₜ₊₁[i] > 1) {
Cₜ₊₁[i] = 1;