Calculating of PI from sin() function in Java Ok... So I'm trying to finish my school project with processing and I'm wondering if there is a way to calculate PI from sin() like this. But I don't know how to use sin() function with degrees in Java or how to write my own. The problem with radians is that I need to convert radians into degrees with PI, which I'm trying to calculate.
Thank you in advance.

I am assuming your sin(x) function takes radians, as stated in the OP.  Start by assigning x = 3 and then iterate the statement x = x + sin(x) a few times (three iterations should work well).  When you are done, x will contain a good approximation to $\pi$.
How does it work? We are using "fixed point iteration" to approximate a root of $x = x + \sin(x)$ near $x = 3$.  Reference: Wikipedia, "Fixed-point iteration"
