'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lv As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
lv.Initialize ("lv")
Dim maxD As Double
maxD=0
For k=0 To 359
Dim a,b,curD As Double
a=CosD(k)
b=cosd2(k)
curD=a/b
lv.AddSingleLine (k & "/" & a & " / " & b & "/" & curD)
maxD=Max(maxD,curD)
Next
Activity.AddView (lv,0,0,Activity.Width,Activity.Height )
Msgbox(maxD,"maxD")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub cosd2(degrees As Double) As Double
Dim n As Int
Dim sumTaylor,x As Double
x=cPI*degrees/180
sumTaylor=0
For n=0 To 20
Dim nf As Long
nf=1
If n>0 Then
For i=1 To 2*n
nf=nf*i
Next
End If
sumTaylor=sumTaylor+Power(-1,n)*Power(x,2*n)/nf
Next
Return sumTaylor
End Sub
Sub lv_itemclick(position As Int,value As Object)
Msgbox(value,"ok")
End Sub