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

fix graph.v example

This commit is contained in:
Alexander Medvednikov 2020-01-16 00:07:59 +01:00
parent 663a8c9c79
commit d5f6e37c65

View File

@ -43,8 +43,8 @@ fn main() {
[live]
fn (ctx &Context) draw() {
center := f64(Size / 2)
ctx.gg.draw_line(0, center, Size, center) // x axis
ctx.gg.draw_line(center, 0, center, Size) // y axis
ctx.gg.draw_line(0, center, Size, center, gx.gray) // x axis
ctx.gg.draw_line(center, 0, center, Size, gx.gray) // y axis
atime := f64( time.ticks() / 10 )
stime := math.sin( 2.0 * pi * f64( time.ticks() % 6000 ) / 6000 )
mut y := 0.0