fix graph.v example

pull/3455/head
Alexander Medvednikov 2020-01-16 00:07:59 +01:00
parent 663a8c9c79
commit d5f6e37c65
1 changed files with 19 additions and 19 deletions

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