a function that
will return true if there are no decimal points and false if there
are.
Maybe a little futher explanation would help. I'm trying to
determine if give number is a power of 2. The math function log
does this very nicely, but the determination is wheather or not the
function returns an integer or not. For instance:
Log(4,2) = 2 which means that 4 is a power of 2
Log(5,2) = 2.3219... which means that 5 is not a poewr of 2
I originally converted the result to a string and then checked to
see if a decimal point existed using the indexOf method, but I
didn't like it as I felt the data conversion and searching through a
string might cause a bit of a performance hit.
What I was _REALLY_ hoping to get was a math function, but the
answer Scott provided is sufficient.