script-fu: fix modulo error in Waves plug-in

Resolves #12844

As suggested by Alx Sa, rounding the phase argument in waves-anim
is enough to fix the argument error the plug-in would run into when
using certain values for "Number of frames".
This commit is contained in:
Anders Jonsson 2025-02-01 22:06:30 +01:00
parent dd8da1e26f
commit f715b54015

View file

@ -70,7 +70,7 @@
(while (< phi 0)
(set! phi (+ phi 360.0))
)
(set! phi (/ (- (modulo phase 360.0) 180.0) 180.0))
(set! phi (/ (- (modulo (round phase) 360.0) 180.0) 180.0))
(if (< aspect 0.1)
(set! aspect 0.1))
(if (> aspect 10.0)
@ -96,7 +96,7 @@
(while (< phi 0)
(set! phi (+ phi 360.0))
)
(set! phi (/ (- (modulo phase 360.0) 180.0) 180.0))
(set! phi (/ (- (modulo (round phase) 360.0) 180.0) 180.0))
(if (< aspect 0.1)
(set! aspect 0.1))