Skip to content

Commit

Permalink
Merge pull request #4768 from nortikin/branch_number_oscillator_trian…
Browse files Browse the repository at this point in the history
…gle_issue_001

Number->Oscillator mode "Triangle" issue. Some corner values reset to minimum
  • Loading branch information
satabol authored Nov 22, 2022
2 parents f667651 + 78cd1c6 commit 2337ea2
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 2337ea2

Please sign in to comment.