get Rectangle Radius - Android Graphics

Android examples for Graphics:Rectangle

Description

get Rectangle Radius

Demo Code


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

public class Main {
    public static int getRadius(Rect square) {
        return square.centerX() - square.left;
    }//  www.  j a  v  a2  s .c  om
}

Related Tutorials