Hi I'm trying to draw a line in java using g.drawLine
g.drawLine (int, int, int, int) || x1, y1, x2, y2
im trying to draw this :
g.drawLine (xCenter + 200 * Math.cos(2 * Math.PI * 3 / 7), yCenter + 200 * Math.sin(2 * Math.PI * 3 / 7), 70 ,336);
but that above is (double, double, int, int)
I made a cast for Math.PI like :
int pi = (int) Math.PI;
this worked
I then tried to do
int cos = (int) Math.cos;
this did not work
so i still get a (double, double, int, int) and g.drawLine wont compile that.
any ideas on how to fix? thanks!!!!