Description:Just a few functions here. Most of these conversion functions i havn't seen yet, so i thought i would post them here. Const PI = 3.14159265358979 'General Public Function Circumference_Of_Circle(Diameter As Single) As Single Circumference_Of_Circle = PI * Diameter End Function 'Area Public Function Area_Of_Circle(Radius As Single) As Single Area_Of_Circle = PI * (Radius * Radius) End Function Public Function Area_Of_Cube(Length As Single) As Single Area_Of_Cube = (Length * Length) * Length End Function Public Function Area_Of_Cuboid(Length As Single, Height As Single, Depth As Single) As Single Area_Of_Cuboid = (Length * Depth) * Height End Function Public Function Area_Of_Cylinder(Height As Single, Radius As Single) As Single Area_Of_Cylinder = ((PI * (Radius * Radius)) * Height) End Function Public Function Area_Of_Prism(Area_Of_End As Single, Length As Single) As Single Area_Of_Prism = Area_Of_End * Length End Function 'Percentage Public Function Percentage_Of(Number As Single, Percent As Single) As Single Percentage_Of = (Number / 100) * Percent End Function Public Function Number_After_Reduction(Original As Single, Percent As Single) As Single Number_After_Reduction = Original - ((Original / 100) * Percent) End Function Public Function Number_After_Increase(Original As Single, Percent As Single) As Single Number_After_Increase = Original + ((Original / 100) * Percent) End Function 'Conversion Public Function Convert_Feet_To_Yards(Feet As Single) As Single Convert_Feet_To_Yards = Feet / 3 End Function Public Function Convert_Inches_To_Feet(Inches As Single) As Single Convert_Inches_To_Feet = Inches / 12 End Function Public Function Convert_Yards_To_Miles(Yards As Single) As Single Convert_Yards_To_Miles = Yards / 1760 End Function Public Function Convert_Ounces_To_Pounds(Ounces As Single) As Single Convert_Ounces_To_Pounds = Ounces / 16 End Function Public Function Convert_Pounds_To_Stones(Pounds As Single) As Single Convert_Pounds_To_Stones = Pounds / 14 End Function Public Function Convert_Stones_To_Tons(Stones As Single) As Single Convert_Stones_To_Tons = Stones / 160 End Function Public Function Convert_Pints_To_Gallons(Pints As Single) As Single Convert_Pints_To_Gallons = Pints / 8 End Function Public Function Convert_Cm_To_Inch(Cm As Single) As Single Convert_Cm_To_Inch = Cm / 2.54 End Function Public Function Convert_Km_To_Mile(Km As Single) As Single Convert_Km_To_Mile = Km / 1.61 End Function Public Function Convert_Kg_To_Pound(KG As Single) As Single Convert_Kg_To_Pound = KG / 0.454 End Function Public Function Convert_Litre_To_Pint(Litres As Single) As Single Convert_Litre_To_Pint = Litres / 0.568 End Function Public Function Convert_Litres_To_Gallon(Litres As Single) As Single Convert_Litres_To_Gallon = Litres / 4.55 End Function Public Function Convert_Miles_To_Km(Miles As Single) As Single Convert_Miles_To_Km = Miles / 0.621 End Function Public Function Convert_Gallons_To_Litres(Gallons As Single) As Single Convert_Gallons_To_Litres = Gallons / 0.22 End Function Public Function Convert_Pounds_To_Kg(Pounds As Single) As Single Convert_Pounds_To_Kg = Pounds / 2.2 End Function |
Some Useful Functions |
Flash web designer india | India Web Development website developer India | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design