logo  VB.Net - Area, Volume and Circumference
This Chapter
Mathematics
Area
Statistics
Factorial
Trignometry
Hyperbolic Trig.
Number Range
Quad&Cubic
Chapters
Home Page
Colours, RGB
Computer Specifications
Dates&Times
Disk Drives
Files
Folders
GPS and OS Ref
VB.Net Forms
Image Files
If & Select
List/Array
Mathematics
NuGet
Sound
String Functions
Sun and Moon
User Controls
Validation
DigitalDan Sites
My Other Sites
Contact Site

Note
Some pages
may contain
inaccuracies
Hits=5
Areas

Public Function AreaCircle(Radius As Double) As Double
 Return Math.PI * Radius * Radius
End Function
'
Public Function AreaEllipse(rMin As Double, rMax As Double) As Double
 Return Math.PI * rMin * rMax
End Function
'
Public Function AreaRectangle(w As Double, h As Double) As Double
 Return w * h
End Function
'
Public Function AreaRhombus(w As Double, h As Double) As Double
 Return 0.5 * w * h
End Function
'
Public Function AreaTriangle(base As Double, height As Double) As Double
 Return 0.5 * base * height
End Function
'
Public Function TriangleArea2(ByVal a As Double, ByVal b As Double, ByVal c As Double) As Double
 Dim s As Double = (a + b + c) / 2
 Return Math.Sqrt(s * (s - a) * (s - b) * (s - c))
End Function
  
Volumes

Public Function VolumeCone(radius As Double, high As Double) As Double
 Return radius * radius * high / 3
End Function
'
Public Function VolumeCube(w As Double, h As Double, d As Double) As Double
 Return w * h * d
End Function
'
Public Function VolumeCylinder(r As Double, h As Double) As Double
 Return Math.PI * r * r * h
End Function
'
Public Function VolumeSphere(radius As Double) As Double
 Return Math.PI * Math.Pow(radius, 3)
End Function
  
Circumference

Public Function CircumferenceCircle(radius As Double) As Double
 Return 2 * Math.PI * radius
End Function
  

DigitalDan.co.uk