Need quick help!!!

call me stupid… but I need quick help in converting to Deg and Rad

I want to calculate:

a=200
b=90
c = sin(a-b)

XOJO seems to calc with Rad (c=0,044) but I need Deg (c should be 0,93)
my school time is a long time ago… could anybody help me out…

degrees = radians * (180 / Pi)

thank you paul but this leads to -2.535 but should be 0.93

here’s a sample project… already tried this…

It doesn’t look like your starting values of a and b are in radians. The Sin() method works with radians.

[code] const pi = 3.14

dim a as double = 200
dim b as double = 90
dim d as Double = (A-b) / 180.0 *pi

dim c as double = sin(d)

MsgBox str©[/code]
works here

your milage may vary

Result can be different for a different pi value.

aaargh… this is tricky… I cannot put all the formula in one line I have to split it up like Christian has done… this sin is just a part of a more complex calculation… and I am wondering all day long why my little WebApp for Navigation doesn’t work…

Here’s the non-working app… I am fixing it right now… thank you Christian!
http://jakobssystems.net/webapps/wind3eck/wind3eck.cgi