|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.precision.CommonBits
public class CommonBits
Determines the maximum number of common most-significant bits in the mantissa of one or numbers. Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0.
Constructor Summary | |
---|---|
CommonBits()
|
Method Summary | |
---|---|
void |
add(double num)
|
static int |
getBit(long bits,
int i)
Extracts the i'th bit of a bitstring. |
double |
getCommon()
|
static int |
numCommonMostSigMantissaBits(long num1,
long num2)
This computes the number of common most-significant bits in the mantissas of two double-precision numbers. |
static long |
signExpBits(long num)
Computes the bit pattern for the sign and exponent of a double-precision number. |
java.lang.String |
toString(long bits)
A representation of the Double bits formatted for easy readability |
static long |
zeroLowerBits(long bits,
int nBits)
Zeroes the lower n bits of a bitstring. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommonBits()
Method Detail |
---|
public static long signExpBits(long num)
num
-
public static int numCommonMostSigMantissaBits(long num1, long num2)
num1
- the first numbernum2
- the second number
public static long zeroLowerBits(long bits, int nBits)
bits
- the bitstring to alter
public static int getBit(long bits, int i)
bits
- the bitstring to extract fromi
- the bit to extract
public void add(double num)
public double getCommon()
public java.lang.String toString(long bits)
|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |