BicepBuddyApp/src/main/java/Matching/MatchAlgorithm.java
public static Integer calculateRatio(Integer length,Integer userOptIdx,Integer otherOptIdx) {
		Integer data = userOptIdx - otherOptIdx;
		if (data < 0) {
			data *= -1;
		}
		return (int)((1 - ((double)data / (double)length)) * 100);
	}
/**
	 * Calculate ratio.
	 * Calculates ratio between 2 users
	 *
	 * @param length the length
	 * @param userOptIdx the user opt idx
	 * @param otherOptIdx the other opt idx
	 * @return the integer
	 */
Calculate ratio.
Calculates ratio between 2 users

@param length the length
@param userOptIdx the user opt idx
@param otherOptIdx the other opt idx
@return the integer
Calculate ratio . Calculates ratio between 2 users @param length the length @param userOptIdx the user opt idx @param otherOptIdx the other opt idx @return the integer
public static Integer calculateRatio(Integer length,Integer userOptIdx,Integer otherOptIdx) {
		Integer data = userOptIdx - otherOptIdx;
		if (data < 0) {
			data *= -1;
		}
		return (int)((1 - ((double)data / (double)length)) * 100);
	}
public static Integer calculateRatio ( Integer length , Integer userOptIdx , Integer otherOptIdx ) { Integer data = userOptIdx - otherOptIdx ; if ( data < 0 ) { data *= - 1 ; } return ( int ) ( ( 1 - ( ( double ) data / ( double ) length ) ) * 100 ) ; }
Calculate ratio.
Calculate ratio .