sine graphic

This commit is contained in:
zbednarke 2024-05-07 20:42:31 -07:00
parent 74d0b22ad1
commit 266797ff04

View file

@ -63,7 +63,7 @@ func main() {
// NOTE: Draw a part of the sine wave (only screen width)
for i := 0; i < int(rl.GetScreenWidth()); i++ {
position.X = float32(i)
position.Y = 250 + 10*data[i]
position.Y = 250 + 10*data[i*nSamples/int(20*rl.GetScreenWidth())]
rl.DrawPixelV(position, rl.Red)
}