How to find Square root of a given number
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 | 'Math - How to find Square root of a given number Public Function dblSqrt(ByVal dblParameter As Double) As Double 'Check if the input parameter is negative If dblParameter < 0 Then 'If the input parameter is negative, return -1 dblSqrt = -1 Else 'If the input parameter is positive, return its square root dblSqrt = Sqr(dblParameter) End If End Function |