|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
math wrong?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 Show quoteHide quote "JamesB" wrote: > 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? > > > "guy" <g**@discussions.microsoft.com> wrote in message That would explain a lot... :)news:653D0FC4-C532-4116-A690-4101893BD588@microsoft.com... > system.math.sin works in radians, the answer you got forom calculator is > sin(1) in degrees > > hth > Thanks "JamesB" <james@spamiscrappy.puffle.co.spam.uk> schrieb: 'Math.Sin' is a .NET Framework function. Like in VB6, mathematical > 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? 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>. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> |
|||||||||||||||||||||||