VB - Basic Circle Calculation

By , 4/28/2008
(2 ratings)
A little Class for basic circle calculation
Public Class Circle
    Public Shared Function GetCircleLength(ByVal Diameter As Double) As Double
        Return Diameter * Math.PI
    End Function

    Public Shared Function GetCircleArea(ByVal Radius As Double) As Double
        Return Math.Pow(Radius, 2) * Math.PI
    End Function

    Public Shared Function GetCircleDiameter(ByVal Area As Double) As Double
        Return Math.Sqrt((Area / Math.PI))
    End Function
End Class
Tagged with circle, math.

Comments

 

Log in, to comment!