diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2014-01-04 07:10:55 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2014-01-04 07:22:20 +0400 |
commit | e505203e8de655a7763f67f37f2766c30f0a70f0 (patch) | |
tree | a626cd71afbb8548b3fa00dee78aea8d6bed61f4 /source/blender/blenkernel/intern | |
parent | 4915706df67e74b0647331c5f6e114cc4819b03a (diff) |
Units: Add milligrams for mass
Avoids having small values displayed as "0kg".
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 632ac6234b2..11a39752391 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -69,6 +69,7 @@ #define UN_SC_HG 0.1f #define UN_SC_DAG 0.01f #define UN_SC_G 0.001f +#define UN_SC_MG 0.000001f #define UN_SC_ITON 907.18474f /* imperial ton */ #define UN_SC_CWT 45.359237f @@ -200,6 +201,7 @@ static struct bUnitDef buMetricMassDef[] = { {"hectogram", "hectograms", "hg", NULL, "Hectograms", UN_SC_HG, 0.0, B_UNIT_DEF_SUPPRESS}, {"dekagram", "dekagrams", "dag", NULL, "10 Grams", UN_SC_DAG, 0.0, B_UNIT_DEF_SUPPRESS}, {"gram", "grams", "g", NULL, "Grams", UN_SC_G, 0.0, B_UNIT_DEF_NONE}, + {"milligram", "milligrams", "mg", NULL, "Milligrams", UN_SC_MG, 0.0, B_UNIT_DEF_NONE}, {NULL, NULL, NULL, NULL, NULL, 0.0, 0.0} }; static struct bUnitCollection buMetricMassCollection = {buMetricMassDef, 2, 0, sizeof(buMetricMassDef) / sizeof(bUnitDef)}; |