sine graphic
This commit is contained in:
parent
74d0b22ad1
commit
266797ff04
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ func main() {
|
||||||
// NOTE: Draw a part of the sine wave (only screen width)
|
// NOTE: Draw a part of the sine wave (only screen width)
|
||||||
for i := 0; i < int(rl.GetScreenWidth()); i++ {
|
for i := 0; i < int(rl.GetScreenWidth()); i++ {
|
||||||
position.X = float32(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)
|
rl.DrawPixelV(position, rl.Red)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue