Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    public static PointF percent(PointF p1, PointF p2, float percent) {
        return percent(p1, percent, p2, percent);
    }

    public static PointF percent(PointF p1, float percent1, PointF p2, float percent2) {
        float x = (p2.x - p1.x) * percent1 + p1.x;
        float y = (p2.y - p1.y) * percent2 + p1.y;
        return new PointF(x, y);
    }
}