examples/graph: a small import fix

pull/1270/head
Alexander Medvednikov 2019-07-22 12:51:22 +02:00
parent 64e9d9e2c3
commit 5933f2107a
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
module main
import gx
import gl
import gg
import time
import glfw
@ -41,7 +42,7 @@ fn (ctx &Context) draw() {
ctx.gg.draw_line(Size / 2, 0, Size / 2, Size) // y axis
center := f64(Size / 2)
for x := -10.0; x <= 10.0; x += 0.002 {
y := (x - 1) * (x - 1) + 1
y := (x - 1) * (x - 1) - 2
ctx.gg.draw_rect(center + x * Scale,
center - y * Scale, 1, 1, gx.Black)
}