Skip to content

Commit

Permalink
Number->Oscillator mode triangle issue. Some corner values reset to m…
Browse files Browse the repository at this point in the history
…inimum.
  • Loading branch information
satabol committed Nov 20, 2022
1 parent f667651 commit 78cd1c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodes/number/oscillator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def oscillator(params, constant, matching_f):
res = amplitude - amplitude * (((val / period + phase) * 2) % 2) + offset

elif mode == 'Triangular':
mask = ((val / period + phase) * 2) % 2 > 1
mask = ((val / period + phase) * 2) % 2 >= 1
res = 2 * amplitude * (((val / period + phase)*2) % 1) - amplitude
res[mask] *= -1
res += offset
Expand Down

0 comments on commit 78cd1c6

Please sign in to comment.