Why does for the same code I got different result
the VB code gave me what I want why not the csharp?
Thank you for your help...
CSHARP CODE
int sx, sy;
double sdegrees;
sdegrees = (90 - (5/15) * 90) * (System.Math.PI / 180);
sx = (int) System.Math.Round(95 * System.Math.Cos(sdegrees));
sy = (int) -(System.Math.Round(95 * System.Math.Sin(sdegrees)));
MessageBox.Show(sdegrees.ToString() + "\n" + sx.ToString() + "\n" +
sy.ToString());
VB CODE
Dim sx, sy As Integer
Dim sdegrees As Double
sdegrees = (90 - (5 / 15) * 90) * (System.Math.PI / 180)
sx = System.Math.Round(95 * System.Math.Cos(sdegrees))
sy = -(System.Math.Round(95 * System.Math.Sin(sdegrees)))
MessageBox.Show(sdegrees.ToString + vbCr + sx.ToString + vbCr + sy.ToString)