3 ms·
I use Java with manifold-units[1] for this. Some examples: > // commonly used unit abbreviations e.g., m, ft, hr, mph, etc. import static manifold.science
by owlstuffing 2y ago
I use Java with manifold-units[1] for this. Some examples:
>
// commonly used unit
abbreviations e.g., m, ft, hr, mph, etc.
import static manifold.science.util.UnitConstants.*;
...
Length l = 5m; // 5 meters
Length height = 5 ft + 9.5 in;
Length distance = 80 mph * 2.3 hr;
Force force = 5kg * 9.807 m/s/s; // 49.035 Newtons
Force f = 49.035 kg m/s/s;
force == f // true
force == 49.035 N // true
1. https://github.com/manifold-systems/manifold/tree/master/manifold-deps-parent/manifold-ext#unit-expressions\\\\ https://github.com/manifold-systems/manifold/tree/master/man...*