Files
contest/uil/aplus-february-2015/10/Radians.MD
2020-02-22 05:44:14 -06:00

9 lines
880 B
Markdown

# Radians
Run my solution on **[repl.it](https://repl.it/@Xevion/A-Computer-Science-February-2015-Radians)!**
This problem was rather simple to implement, although, it did trip me up when it specified that everything `must be in terms of PI`. I didn't get that essentially you have to divide the converted radians to PI, so it helps to remember the meaning of that sentence (but I did later notice and correct this).
Otherwise, implementation is self explanatory and requires no extraneous thought. For those not aware, the method `Math.toRadians` can be used to convert degrees to radians easily, which is very important to remember should one be programming in JCreator, or an IDE with no built-in/enabled code completion/code intelligence plugins.
I recommend using `String.format` for this problem deeply, as it helps with rounding off the decimal radians measure quickly.