Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21248

Help: Convert this simple C# to VB6

$
0
0
Hello,

It's quite straightforward but getting different results in VB6 :/

Code:

ushort rr;
        rr =  (ushort)(Math.Log(32000 / 48000.0) * 1536.0 / Math.Log(2.0));

Should return: 64638

Code:

MsgBox Math.Log(32000 / 48000#) * 1536# / Math.Log(2#)
I'm getting negative numbers in VB :/

Viewing all articles
Browse latest Browse all 21248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>