Line angle from two Point - Android java.lang

Android examples for java.lang:Math Geometry

Description

Line angle from two Point

Demo Code


//package com.java2s;
import android.graphics.PointF;

public class Main {
    public static double angle(PointF a, PointF b) {
        return Math.atan2(b.y, b.x) - Math.atan2(a.y, a.x);
    }//w  ww.  ja  v  a  2s .  co  m
}

Related Tutorials