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:
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
Block a user