diff options
Diffstat (limited to 'spline/spline.cpp')
-rw-r--r-- | spline/spline.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp index c240ebbd..1a0f7257 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -226,11 +226,13 @@ void spline::update_interp_data() } } + double maxy = max_output(); float last = 0; for (unsigned i = 0; i < unsigned(value_count); i++) { if (data[i] == magic_fill_value) data[i] = last; + data[i] = (float)clamp(data[i], 0, maxy); last = data[i]; } } |