Here you can find the source of computeMean(int val1, int val2, float ratio)
Parameter | Description |
---|---|
val1 | val1 |
val2 | val2 |
ratio | ratio |
public static int computeMean(int val1, int val2, float ratio)
//package com.java2s; /*/*w w w.jav a 2 s. c o m*/ * Java * * Copyright 2016 IS2T. All rights reserved. * Use of this source code is subject to license terms. */ public class Main { /** * Compute the mean of row values. * * @param val1 * val1 * @param val2 * val2 * @param ratio * ratio * @return mean */ public static int computeMean(int val1, int val2, float ratio) { return (int) ((1.0f - ratio) * val2 + ratio * val1); } }