Java tutorial
//package com.java2s; /** * AndTinder v0.1 for Android * * @Author: Enrique Lpez Maas <eenriquelopez@gmail.com> * http://www.lopez-manas.com * * TAndTinder is a native library for Android that provide a * Tinder card like effect. A card can be constructed using an * image and displayed with animation effects, dismiss-to-like * and dismiss-to-unlike, and use different sorting mechanisms. * * AndTinder is compatible with API Level 13 and upwards * * @copyright: Enrique Lpez Maas * @license: Apache License 2.0 */ public class Main { public static float functionNormalize(int max, int min, int value) { int intermediateValue = max - min; value -= intermediateValue; float var = Math.abs((float) value / (float) intermediateValue); return Math.abs((float) value / (float) intermediateValue); } }