1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples/graph: a small import fix

This commit is contained in:
Alexander Medvednikov 2019-07-22 12:51:22 +02:00
parent 64e9d9e2c3
commit 5933f2107a

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)
}