package precision
- Alphabetic
- Public
- Protected
Type Members
- class CommonBits extends AnyRef
- class CommonBitsRemover extends AnyRef
Value Members
- object CommonBits
Determines the maximum number of common most-significant bits in the mantissa of one or numbers.
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.
- Version
1.7
- object CommonBitsRemover
Removes common most-significant mantissa bits from one or more {link Geometry}s.
Removes common most-significant mantissa bits from one or more {link Geometry}s.
The CommonBitsRemover "scavenges" precision which is "wasted" by a large displacement of the geometry from the origin. For example, if a small geometry is displaced from the origin by a large distance, the displacement increases the significant figures in the coordinates, but does not affect the relative topology of the geometry. Thus the geometry can be translated back to the origin without affecting its topology. In order to compute the translation without affecting the full precision of the coordinate values, the translation is performed at the bit level by removing the common leading mantissa bits.
If the geometry envelope already contains the origin, the translation procedure cannot be applied. In this case, the common bits value is computed as zero.
If the geometry crosses the Y axis but not the X axis (and mutatis mutandum), the common bits for Y are zero, but the common bits for X are non-zero.
- Version
1.7