Android examples for android.graphics:PointF
Calculate theta
import android.graphics.PointF; public class Main{ public static double theta(PointF p) { return Math.atan2(p.x, p.y); }//from ww w . j av a2 s . c om public static double theta(PointF p, PointF o) { PointF v = new PointF(); v.x = p.x - o.x; v.y = p.y - o.y; return theta(v); } public static double theta(PointF p) { return Math.atan2(p.x, p.y); } public static double theta(PointF p, PointF o) { PointF v = new PointF(); v.x = p.x - o.x; v.y = p.y - o.y; return theta(v); } }