I want to round pi number to an integer and then use it in drawLine command with the following code:
double pi = Math.PI
g.drawLine(0, 0, 0, n * Math.sin(5 * pi));
but as you know the drawLine command doesn't take double input and it gives error. so can someone tell me how can i solve the problem?
either round the number to integer or if there is an equivalent command to drawLine for double input?