get Middle Value between two int values - Android java.lang

Android examples for java.lang:Integer

Description

get Middle Value between two int values

Demo Code


//package com.java2s;

public class Main {
    private static int getMiddleValue(int prev, int next, float factor) {
        return Math.round(prev + (next - prev) * factor);
    }//from  w ww. j a v a2  s .c  o m
}

Related Tutorials