get Center for two points - Android Graphics

Android examples for Graphics:Path Point

Description

get Center for two points

Demo Code


//package com.java2s;

import android.graphics.Point;

public class Main {
    public static Point getCenter(Point point, Point point2) {
        return new Point((point.x + point2.x) / 2, (point.y + point2.y) / 2);
    }//from ww w  . ja va2s . co  m
}

Related Tutorials