Dear colleagues,
please allow me to introduce my Kotlin library for work with physical and other units:
KotUniL.
There are also other libraries that try to solve similar tasks. Unfortunately, they were all not good enough for my purposes and I developed my own.
KotUniL is subject to
Apache 2 license terms. It is available via
MavenCentral.
KotUniL is a library of functions and objects of Kotlin that meet the following requirements in total:
1. It covers all units of SI base units (see
https://en.wikipedia.org/wiki/International_System_of_Units) like meter, second etc. as well as some other common units like currencies, percentages etc.
2. It allows various formulas to be written in Kotlin in a way maximally similar to the way formulas are written in physics and economics.
3. It allows analyzing dimensions of results of applications of complicated formulas.
4. It allows to detect most of the typical errors when working with SI units already at the compilation stage. Errors in incorrect use of physical units in complex formulas are detected in runtime.
5. It is pure library (no plug-in, no parser etc.), it has no dependencies
MavenCentral:
https://central.sonatype.dev/artifact/eu.sirotin.kotunil/kotunil/1.0.1/overview
GitHub repository:
https://github.com/vsirotin/si-units