Here you can find the source of distance(BigInteger a, BigInteger b)
Parameter | Description |
---|---|
a | BigInteger |
b | BigInteger |
public static final BigInteger distance(BigInteger a, BigInteger b)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; public class Main { /**/*from w ww .j a v a2 s .c o m*/ * return the distance between two number, that is |a-b|. * no checking is done. * @param a BigInteger * @param b BigInteger * @return BigInteger */ public static final BigInteger distance(BigInteger a, BigInteger b) { return a.subtract(b).abs(); } }