Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.graphics.RectF;

public class Main {
    /**
     * Creates square based on circle.
     *
     * @param centerX x of center point
     * @param centerY y of center point
     * @param radius  radius
     * @return square object
     */
    public static RectF createSquare(float centerX, float centerY, float radius) {
        return new RectF(centerX - radius, centerY - radius, centerX + radius, centerY + radius);
    }
}