Public Structure PolarPoint

    Private m_r, m_theta As Double


    Public Sub New(ByVal r As Double, ByVal theta As Double)

        m_r = r
        m_theta = theta

    End Sub


    Public Property theta() As Double

        Get
            Return m_theta
        End Get

        Set(ByVal Value As Double)
            m_theta = Value
        End Set


    End Property


    Public Property r() As Double

        Get
            Return m_r
        End Get

        Set(ByVal Value As Double)
            m_r = Value
        End Set

    End Property


    Public Function Distance(ByVal otherPP As PolarPoint) As Double

        Return Math.Sqrt( _
         (r * r) + _
         (otherPP.r * otherPP.r) - _
         2 * r * otherPP.r * Math.Cos(otherPP.theta - theta))

    End Function


    Public Sub AMethod()

        Dim al As New System.Collections.ArrayList

        Dim i As Integer = 5

        al(0) = i

        al.Add(i)

        Dim j As Integer
        j = al(0)


    End Sub

End Structure
