Here you can find the source of rotate(Point toRotate, float tetta)
public static Point rotate(Point toRotate, float tetta)
//package com.java2s; //License from project: Apache License import java.awt.Point; public class Main { public static Point rotate(Point toRotate, float tetta) { float sin = (float) Math.sin(tetta); float cos = (float) Math.cos(tetta); int x = (int) (toRotate.x * cos - toRotate.y * sin); int y = (int) (toRotate.x * sin + toRotate.y * cos); return new Point(x, y); }//from w w w .ja va2 s . co m }