Hello, for a side project where I have to find the...

# sciencel

louiscad

11/02/2021, 6:38 PMHello, for a side project where I have to find the right dimensions and shapes for physical parts, I started to write SI and geometry types in Kotlin as `value class`es, along with various functions for the various calculations I need to perform.
FYI, "SI" means "Système International", which translates to "Internation System of Units", and includes all the science 7 base units like distance (in meters) and time (in seconds), and their derivatives like acceleration (m.s^-2), torque (I don't recall about that one)…
It's not feature complete, I often find myself adding types, operators and functions, but I'm wondering if sharing such a library would still be useful.
I also know it can never be really fully feature complete since the Kotlin type system isn't as flexible as the SI which allows infinte possibilities of derivative units.
Has anyone made such a library yet?
Do you have projects where it'd be useful to you?

a

altavir

11/02/2021, 8:05 PMYou should probably look at https://github.com/nacular/measured. It would be nice to have something like that in future. But the idea itself needs some refinement.

👀 2

5 Views