We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a190cb commit e9dcaebCopy full SHA for e9dcaeb
adafruit_waveform/sine.py
@@ -24,5 +24,5 @@ def sine_wave(sample_frequency: float, pitch: float):
24
length = int(sample_frequency / pitch)
25
b = array.array("H", [0] * length)
26
for i in range(length):
27
- b[i] = int(math.sin(math.pi * 2 * i / length) * ((2 ** 15) - 1) + 2 ** 15)
+ b[i] = int(math.sin(math.pi * 2 * i / length) * ((2**15) - 1) + 2**15)
28
return b
0 commit comments