Get center Point between two Points - Android Graphics

Android examples for Graphics:Path Point

Description

Get center Point between two Points

Demo Code


import android.graphics.PointF;

public class Main{
    public static PointF center(PointValue p1, PointValue p2) {
        return new PointF((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
    }/*from  w ww .ja  va2s  .  c o m*/
}

Related Tutorials