Here you can find the source of mod_diff(int x, int y, int R)
static int mod_diff(int x, int y, int R)
//package com.java2s; /*/*from w w w . j a v a 2 s . c o m*/ * TLSH is provided for use under two licenses: Apache OR BSD. * Users may opt to use either license depending on the license * restictions of the systems with which they plan to integrate * the TLSH code. */ public class Main { static int mod_diff(int x, int y, int R) { int dl = 0; int dr = 0; if (y > x) { dl = y - x; dr = x + R - y; } else { dl = x - y; dr = y + R - x; } return (dl > dr ? dr : dl); } }