kevin.cianfarini
01/02/2025, 5:47 PMJoules
, Watts
, Kilometers
, Kilograms
, etc and is modeled after kotlin.time.Duration
. It also allows for logical arithmetic like power = energy / duration
.
* Documentation
* RepositorySargun Vohra
01/02/2025, 6:42 PMkevin.cianfarini
01/02/2025, 6:44 PMJoel Denke
01/03/2025, 1:58 PMPiotr Krzemiński
01/03/2025, 3:30 PMkevin.cianfarini
01/03/2025, 9:19 PMas
or in
. All of the quantities exposed in alchemist are modeled off of Duration.
• alchemist prevents integer overflow or underflow, instead opting to clamp values to Long.MAX_VALUE
or Long.MIN_VALUE
, which are treated as infinite values internally.altavir
01/05/2025, 12:04 PMSaturated
numbers have its benifits, but it blocks common mathematical operations as well.
If you are really interested in pursuing this direction, I recommend to start discussion in #CEXV2QWNM. There are several known approaches to unit management and they have their own pros and cons. It is important to have a single API in this regard for other libraries, otherwise it would be unusable. So we must start with design document for that.kevin.cianfarini
01/05/2025, 2:45 PMKlitos Kyriacou
01/05/2025, 5:36 PMaltavir
01/05/2025, 6:20 PMKlitos Kyriacou
01/06/2025, 9:07 AMaltavir
01/06/2025, 10:19 AM