Java tutorial
//package com.java2s; public class Main { public static int To360Degrees(double rot) { return (int) Math.round(rot / Math.PI * 180); } }