hello..
i have the following function:
when i call this function with an argument 12 it returns 72929 instead of 72928.8864. ie it is rounding up for some reason. i'm absolutely sure that the variable i set equal to the function (when i call it) is declared as a long.
any ideas why this is happening?
thanks!
i have the following function:
Code:
Function w(ByVal diameter As Long) As Long
w = (diameter / 2 * 10 * 2.54) * (diameter / 2 * 10 * 2.54) * 3.14
End Function
when i call this function with an argument 12 it returns 72929 instead of 72928.8864. ie it is rounding up for some reason. i'm absolutely sure that the variable i set equal to the function (when i call it) is declared as a long.
any ideas why this is happening?
thanks!