Version 2.1.0 - Fix Floating Point Precision Errors
NuGet Package Release: https://www.nuget.org/packages/OpenLocationCode/2.1.0
Release Notes
- Implemented a new algorithm for
Encode()
andDecode()
that uses 64-bit integer arithmetic to avoid floating point precision errors.- The original algorithm used floating point arithmetic which caused precision issues as discussed in Issue google/open-location-code#307.
- The
CodeArea
class was improved without any breaking changes- Added the
CodeLength
property as the length of the decoded Open Location Code. - Add new publicly accessible
GeoArea
class which now contains the generic area properties and methods and is extended by CodeArea. - The CodeArea constructor is still not publicly accessible to ensure that all CodeArea instances represent a valid OLC area.
- Added the
- The unit tests were improved to read and parse the test_data CSV files from the original open-location-code project.
- The
encoding.csv
anddecoding.csv
TestData files also include new test cases for these changes. - No unit tests or test cases were removed (only added).
- The