mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 04:49:26 -07:00
Add Angstrom unit to Length units in UnitConverterDataLoader.cpp
Adds the Angstrom unit of length to the list of length units in UnitConverterDataLoader.cpp and its conversion data is added to the GetConversionData() function. It is assigned the value of 15.
This commit is contained in:
parent
3d5e857375
commit
b10e229e76
1 changed files with 3 additions and 0 deletions
|
@ -400,6 +400,8 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
|
|||
unitMap.emplace(ViewMode::Energy, energyUnits);
|
||||
|
||||
vector<OrderedUnit> lengthUnits;
|
||||
lengthUnits.push_back(OrderedUnit{
|
||||
UnitConverterUnits::Length_Angstrom, GetLocalizedStringName(L"UnitName_Angstrom"), GetLocalizedStringName(L"UnitAbbreviation_Angstrom"), 15 });
|
||||
lengthUnits.push_back(OrderedUnit{ UnitConverterUnits::Length_Centimeter,
|
||||
GetLocalizedStringName(L"UnitName_Centimeter"),
|
||||
GetLocalizedStringName(L"UnitAbbreviation_Centimeter"),
|
||||
|
@ -855,6 +857,7 @@ void UnitConverterDataLoader::GetConversionData(_In_ unordered_map<ViewMode, uno
|
|||
{ ViewMode::Length, UnitConverterUnits::Length_Micron, 0.000001 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Millimeter, 0.001 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Nanometer, 0.000000001 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Angstrom, 0.0000000001 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Centimeter, 0.01 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Meter, 1 },
|
||||
{ ViewMode::Length, UnitConverterUnits::Length_Kilometer, 1000 },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue