Code:#define PI 3.14159265 #include <stdio.h> #include <math.h> void main(void){ double angleB = 180.00000000000; double L1; L1 = sin(angleB*PI/180); printf("%f", L1); }
in the console, printf, prints 0.000000 (as expected)
when I hover over L1 it reads, 3.5897934739268e-009
Which then screws up the rest of my calcuations. Can someone tell me why this is so?
Ta
Harry
(Visual C++ 6.0) - For those who don't know sin(180) should = 0 ..