Here you can find the source of distance(float value1, float value2)
Parameter | Description |
---|---|
value1 | Source value. |
value2 | Destination value. |
public static float distance(float value1, float value2)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w . j a v a2 s . c o m * Calculates the absolute value of the difference of two values. * * @param value1 * Source value. * @param value2 * Destination value. * @return Distance between the two values. */ public static float distance(float value1, float value2) { return Math.abs(value1 - value2); } }