You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(library): Port PolyUtil to Kotlin and enhance tests (#1565)
* feat: port MathUtil to Kotlin
This commit ports the `MathUtil` class from Java to idiomatic Kotlin.
The existing tests were leveraged to ensure that the port was successful, and a new test was added for `MathUtil` to ensure that it is well-tested.
* feat: port SphericalUtil to Kotlin
This commit ports the `SphericalUtil` class from Java to idiomatic Kotlin.
The existing tests were leveraged to ensure that the port was successful, and the tests were updated to use Google Truth assertions.
* feat(library): Port PolyUtil to Kotlin and enhance tests
This commit introduces a significant modernization of the `PolyUtil` class by porting it from Java to idiomatic Kotlin. This change improves the code's conciseness, readability, and null safety.
The key changes in this commit are:
- **Porting `PolyUtil` to Kotlin**: The `PolyUtil` class has been completely rewritten in Kotlin, taking advantage of features like top-level functions, default arguments, and extension functions. The public API has been preserved with `@JvmStatic` annotations to ensure backward compatibility for Java consumers.
- **Updating tests to use Google Truth**: The corresponding `PolyUtilTest` has been updated to use Google Truth assertions. This makes the tests more readable and expressive.
* fix: Add correct copyright header
* refactor: minor changes to comments and a fix to use the correct Google truth dependency
* Update library/src/main/java/com/google/maps/android/MathUtil.kt
Co-authored-by: Enrique López-Mañas <[email protected]>
---------
Co-authored-by: Enrique López-Mañas <[email protected]>
0 commit comments