fix graph.v example
parent
663a8c9c79
commit
d5f6e37c65
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue