[求助]画余弦函数图
我做的正弦函数图就正常显示,余弦函数图就不正常,总是在开始的地方多出来一部分斜线
是不是我的程序有问题:
Private Sub Form_Click()
Dim x As Single, y As Single
Picture1.Scale (-1, 1.1)-(7, -1.1)
Picture1.DrawStyle = 3
Picture1.Line (-1, 0)-(7, 0)
Picture1.Line (0, -1)-(0, 1)
Picture1.DrawStyle = 0
Picture1.PSet (0, 0)
dx = 2 * 3.14159 / 30
For i = 0 To 29
x = x + dx
y = Cos(x)
Picture1.Line -(x, y)
Next i
End Sub