You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All units have a corresponding unit enum value, in fact the unit classes are generated from these. This is useful when you want to let the user choose the unit, such as when editing the height in his user profile.
49
+
All units have a corresponding unit enum value. This is useful when selecting the unit representation at runtime, such as presenting a choice of units to the user.
51
50
```C#
52
51
/// <summary>Convert the previous height to the new unit.</summary>
The culture defaults to Thread.CurrentUICulture and affects localization of unit abbreviations as well as number formatting. The relevant methods are:
67
+
The culture for abbreviations defaults to Thread.CurrentUICulture and falls back to US English if not defined. Thread.CurrentCulture affects number formatting unless a custom culture is specified. The relevant methods are:
69
68
70
69
* ToString()
71
70
* GetAbbreviation()
72
71
* Parse/TryParse()
73
-
* ParseUnit/TryParseUnit() support cultures.
74
-
75
-
The abbreviations support localization, but currently only US English, Russian and Norwegian are implemented. Localization defaults to US English if no localization for the current/specified culture is found.
A base unit is chosen for each unit class, represented by a double value (64-bit), and all conversions go via this unit. This means there will always be a small error in both representing other units than the base unit as well as converting between units. Also, some conversions may use different constants in different contexts, such as the air temperature or the standard gravity.
108
+
A base unit is chosen for each unit class, represented by a double value (64-bit), and all conversions go via this unit. This means there will always be a small error in both representing other units than the base unit as well as converting between units.
113
109
114
110
Units.NET was intended for convenience and ease of use, not highly accurate conversions, but I am open to suggestions for improvements.
115
111
116
-
The tests accept an error up to 1E-5 for all the units added so far. In many usecases this is sufficient, but for others this may be a showstopper and something you need to be aware of.
112
+
The tests accept an error up to 1E-5 for most units added so far. Exceptions include units like Teaspoon, where the base unit cubic meter is a lot bigger. In many usecases this is sufficient, but for others this may be a showstopper and something you need to be aware of.
117
113
118
114
For more details, see [Precision](https://github.com/InitialForce/UnitsNet/wiki/Precision).
119
115
120
116
121
117
What It Is Not
122
118
===
123
-
* It is not an equation solver.
124
-
* It does not figure out the units after a calculation.
119
+
* It is not an equation solver
120
+
* It does not figure out the units after a calculation
125
121
126
122
Want To Contribute?
127
123
==
@@ -133,7 +129,7 @@ The repo uses [git-flow](https://github.com/nvie/gitflow) branch structure.
133
129
In practice this means:
134
130
*[Fork the repo](https://help.github.com/articles/fork-a-repo) as normal
135
131
* Checkout the default **develop** branch. There is no master branch.
136
-
* Do work on branches such as **feature/add-myunit** and **fix-some-bug**
132
+
* Do work on branches such as **feature/add-myunit** and **fix/34**
137
133
*[Create a pull request](https://help.github.com/articles/using-pull-requests) as normal.
0 commit comments