math wrong?

  • Thread starter Thread starter JamesB
  • Start date Start date
J

JamesB

I am trying to use the math.sin(value) function but it seems to give me the
wrong answer!
For instance, math.sin(1) is returning 0.84147098.... whereas windows calc
doing 1 then pressing sin gives me 0.017452406.....

Where am I going wrong? Or can't VB add up?
 
system.math.sin works in radians, the answer you got forom calculator is
sin(1) in degrees

hth

guy
 
guy said:
system.math.sin works in radians, the answer you got forom calculator is
sin(1) in degrees

hth

That would explain a lot... :)
Thanks
 
JamesB said:
For instance, math.sin(1) is returning 0.84147098.... whereas windows calc
doing 1 then pressing sin gives me 0.017452406.....

Where am I going wrong? Or can't VB add up?

'Math.Sin' is a .NET Framework function. Like in VB6, mathematical
functions deal with radians. You'll may want to convert them to degrees
using the formula presented at
<URL:http://www.tmt.com/helphtml/radtodeg_func.htm>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top