Commit aeb0cd7
Convert BitRate and Information to double (#1353)
In PR #1195 @angularsen asks @tmilnthorp:
> Question; what do you think of also changing Information/BitRate from
decimal to double?
>
> On one hand, it is sort of weird to risk getting rounding errors like
8.00000001 bits. On the other hand, for all other units (kilobyte, etc)
that are probably way more used, floating point is perhaps the expected
value representation.
>
> If we change all 3 quantities to double, we have the potential to
clean up a LOT of QuantityValue complexity.
How about we continue that discussion here? 😄
This PR is pretty straightforward and mimics #1195, except that
`Information` is used as the typical decimal quantity in some tests.
Because there won't be any decimal quantities left if these PRs get
merged, I removed those tests in anticipation of completely removing all
decimal support.
---------
Co-authored-by: Andreas Gullberg Larsen <[email protected]>1 parent 943a158 commit aeb0cd7
File tree
23 files changed
+670
-918
lines changed- Common/UnitDefinitions
- UnitsNet.NanoFramework/GeneratedCode/Quantities
- UnitsNet.Serialization.JsonNet.Tests
- UnitsNet.Tests
- CustomCode
- GeneratedCode/TestsBase
- Serialization
- Json
- Xml
- UnitsNet
- GeneratedCode/Quantities
23 files changed
+670
-918
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments