Here you can find the source of distance(float value1, float value2)
Parameter | Description |
---|---|
value1 | a parameter |
value2 | a parameter |
public static float distance(float value1, float value2)
//package com.java2s; // file 'LICENSE', which is part of this source code package. public class Main { /**// w ww . j av a2 s . co m * Get the distance between two values. * @param value1 * @param value2 * @return Return the distance between value1 and value2 */ public static float distance(float value1, float value2) { return Math.abs(value1 - value2); } /** * Get the distance between two values. * @param value1 * @param value2 * @return Return the distance between value1 and value2 */ public static int distance(int value1, int value2) { return (int) distance((float) value1, (float) value2); } }