Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.PointF; public class Main { public static PointF calculateMidPoint(PointF start, PointF end) { PointF middle = new PointF(); middle.set((start.x + end.x) / 2, (start.y + end.y) / 2); return middle; } }