Java examples for 2D Graphics:Dimension
get a point between two other points given a decimal percentage i.e.
//package com.java2s; public class Main { /**/*from ww w . j a va 2 s . com*/ * get a point between two other points given a decimal percentage * i.e. 0.5 will be half way between the two * * @param xStart * @param xEnd * @param percentDecimal * @return */ public static float getPointBetweenTwoPoints(float xStart, float xEnd, double percentDecimal) { return (float) (xStart + percentDecimal * (xEnd - xStart)); } }