diff --git a/Build/build-pack-nano-nugets.psm1 b/Build/build-pack-nano-nugets.psm1
index 6898248bf9..1b15f6f997 100644
--- a/Build/build-pack-nano-nugets.psm1
+++ b/Build/build-pack-nano-nugets.psm1
@@ -8,7 +8,6 @@ function Invoke-BuildNanoNugets {
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Duration\UnitsNet.NanoFramework.Duration.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\ElectricCurrent\UnitsNet.NanoFramework.ElectricCurrent.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\ElectricPotential\UnitsNet.NanoFramework.ElectricPotential.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
- & $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\ElectricPotentialDc\UnitsNet.NanoFramework.ElectricPotentialDc.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\ElectricResistance\UnitsNet.NanoFramework.ElectricResistance.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Frequency\UnitsNet.NanoFramework.Frequency.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
& $nuget pack "$root\UnitsNet.NanoFramework\GeneratedCode\Illuminance\UnitsNet.NanoFramework.Illuminance.nuspec" -Verbosity detailed -OutputDirectory "$nugetOutDir"
diff --git a/CodeGen/CodeGen.csproj b/CodeGen/CodeGen.csproj
index 42b3658625..24c93d5eca 100644
--- a/CodeGen/CodeGen.csproj
+++ b/CodeGen/CodeGen.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
latest
enable
@@ -10,11 +10,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/CodeGen/Exceptions/UnitsNetCodeGenException.cs b/CodeGen/Exceptions/UnitsNetCodeGenException.cs
index 2e98bc3e86..e25340993a 100644
--- a/CodeGen/Exceptions/UnitsNetCodeGenException.cs
+++ b/CodeGen/Exceptions/UnitsNetCodeGenException.cs
@@ -2,20 +2,11 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
-using System.Runtime.Serialization;
namespace CodeGen.Exceptions
{
internal class UnitsNetCodeGenException : Exception
{
- public UnitsNetCodeGenException()
- {
- }
-
- protected UnitsNetCodeGenException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
-
public UnitsNetCodeGenException(string message) : base(message)
{
}
diff --git a/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs b/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs
index 885ff15780..b946256f83 100644
--- a/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs
+++ b/CodeGen/Generators/NanoFrameworkGen/NuspecGenerator.cs
@@ -25,7 +25,7 @@ public string Generate()
UnitsNet.nanoFramework.{_quantity.Name}
- 5.74.0
+ 6.0.0-pre014
Units.NET {_quantity.Name} - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
diff --git a/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs b/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
index 721c9a94ce..91082c28c0 100644
--- a/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/NanoFrameworkGen/QuantityGenerator.cs
@@ -43,7 +43,7 @@ public struct {_quantity.Name}
///
/// The numeric value this quantity was constructed with.
///
- private readonly {_quantity.ValueType} _value;
+ private readonly double _value;
///
/// The unit this quantity was constructed with.
@@ -53,7 +53,7 @@ public struct {_quantity.Name}
///
/// The numeric value this quantity was constructed with.
///
- public {_quantity.ValueType} Value => _value;
+ public double Value => _value;
///
public {_unitEnumName} Unit => _unit;
@@ -65,8 +65,7 @@ public struct {_quantity.Name}
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public {_quantity.Name}({_quantity.ValueType} value, {_unitEnumName} unit)
+ public {_quantity.Name}(double value, {_unitEnumName} unit)
{{
_value = value;
_unit = unit;
@@ -79,29 +78,14 @@ public struct {_quantity.Name}
///
/// Represents the largest possible value of {_quantity.Name}.
- /// ");
-
- // Non decimal
- Writer.WLCondition(_quantity.ValueType != "decimal", $@"
- public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}({_quantity.ValueType}.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of {_quantity.Name}.
///
- public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}({_quantity.ValueType}.MinValue, BaseUnit);
-");
-
- // Decimal MaxValue = 79228162514264337593543950335M
- Writer.WLCondition(_quantity.ValueType == "decimal", $@"
- public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}(79228162514264337593543950335M, BaseUnit);
+ public static {_quantity.Name} MaxValue {{ get; }} = new {_quantity.Name}(double.MaxValue, BaseUnit);
///
/// Represents the smallest possible value of {_quantity.Name}.
///
- public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}(-79228162514264337593543950335M, BaseUnit);
-");
+ public static {_quantity.Name} MinValue {{ get; }} = new {_quantity.Name}(double.MinValue, BaseUnit);
- Writer.WL($@"
///
/// Gets an instance of this quantity with a value of 0 in the base unit Second.
///
@@ -134,7 +118,7 @@ private void GenerateConversionProperties()
/// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public {_quantity.ValueType} {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
+ public double {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
");
}
@@ -157,11 +141,10 @@ private void GenerateStaticFactoryMethods()
Writer.WL($@"
///
/// Creates a from .
- ///
- /// If value is NaN or Infinity. ");
+ /// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public static {_quantity.Name} From{unit.PluralName}({_quantity.ValueType} {valueParamName}) => new {_quantity.Name}({valueParamName}, {_unitEnumName}.{unit.SingularName});
+ public static {_quantity.Name} From{unit.PluralName}(double {valueParamName}) => new {_quantity.Name}({valueParamName}, {_unitEnumName}.{unit.SingularName});
");
}
@@ -172,7 +155,7 @@ private void GenerateStaticFactoryMethods()
/// Value to convert from.
/// Unit to convert from.
/// {_quantity.Name} unit value.
- public static {_quantity.Name} From({_quantity.ValueType} value, {_unitEnumName} fromUnit)
+ public static {_quantity.Name} From(double value, {_unitEnumName} fromUnit)
{{
return new {_quantity.Name}(value, fromUnit);
}}
@@ -190,7 +173,7 @@ private void GenerateConversionMethods()
/// Convert to the unit representation .
///
/// Value converted to the specified unit.
- public {_quantity.ValueType} As({_unitEnumName} unit) => GetValueAs(unit);
+ public double As({_unitEnumName} unit) => GetValueAs(unit);
///
/// Converts this {_quantity.Name} to another {_quantity.Name} with the unit representation .
@@ -207,7 +190,7 @@ private void GenerateConversionMethods()
/// This is typically the first step in converting from one unit to another.
///
/// The value in the base unit representation.
- private {_quantity.ValueType} GetValueInBaseUnit()
+ private double GetValueInBaseUnit()
{{
return Unit switch
{{");
@@ -223,7 +206,7 @@ private void GenerateConversionMethods()
}};
}}
- private {_quantity.ValueType} GetValueAs({_unitEnumName} unit)
+ private double GetValueAs({_unitEnumName} unit)
{{
if (Unit == unit)
return _value;
diff --git a/CodeGen/Generators/NanoFrameworkGenerator.cs b/CodeGen/Generators/NanoFrameworkGenerator.cs
index 1753235749..19d8cab43c 100644
--- a/CodeGen/Generators/NanoFrameworkGenerator.cs
+++ b/CodeGen/Generators/NanoFrameworkGenerator.cs
@@ -90,20 +90,6 @@ public static void Generate(string rootDir, Quantity[] quantities, QuantityNameT
GenerateQuantity(quantity, Path.Combine(outputQuantities, $"{quantity.Name}.g.cs"));
GenerateProject(quantity, Path.Combine(projectPath, $"{quantity.Name}.nfproj"), versions);
- // Convert decimal based units to floats; decimals are not supported by nanoFramework
- if (quantity.ValueType == "decimal")
- {
- var replacements = new Dictionary
- {
- { "(\\d)m", "$1d" },
- { "(\\d)M", "$1d" },
- { " decimal ", " double " },
- { "(decimal ", "(double " }
- };
- new FileInfo(Path.Combine(outputDir, "Units", $"{quantity.Name}Unit.g.cs")).EditFile(replacements);
- new FileInfo(Path.Combine(outputDir, "Quantities", $"{quantity.Name}.g.cs")).EditFile(replacements);
- }
-
Log.Information("✅ {Quantity} (nanoFramework)", quantity.Name);
}
Log.Information("");
diff --git a/CodeGen/Generators/QuantityJsonFilesParser.cs b/CodeGen/Generators/QuantityJsonFilesParser.cs
index 316e785fd6..e1d50871a7 100644
--- a/CodeGen/Generators/QuantityJsonFilesParser.cs
+++ b/CodeGen/Generators/QuantityJsonFilesParser.cs
@@ -6,138 +6,89 @@
using System.IO;
using System.Linq;
using CodeGen.Exceptions;
-using CodeGen.Helpers;
+using CodeGen.Helpers.PrefixBuilder;
using CodeGen.JsonTypes;
using Newtonsoft.Json;
+using static CodeGen.Helpers.PrefixBuilder.BaseUnitPrefixes;
-namespace CodeGen.Generators
+namespace CodeGen.Generators;
+
+///
+/// Parses JSON files that define quantities and their units.
+/// This will later be used to generate source code and can be reused for different targets such as .NET framework,
+/// .NET Core, .NET nanoFramework and even other programming languages.
+///
+internal static class QuantityJsonFilesParser
{
+ private static readonly JsonSerializerSettings JsonSerializerSettings = new()
+ {
+ // Don't override the C# default assigned values if no value is set in JSON
+ NullValueHandling = NullValueHandling.Ignore
+ };
+
+ private static readonly string[] BaseQuantityFileNames =
+ ["Length", "Mass", "Duration", "ElectricCurrent", "Temperature", "AmountOfSubstance", "LuminousIntensity"];
+
///
/// Parses JSON files that define quantities and their units.
- /// This will later be used to generate source code and can be reused for different targets such as .NET framework,
- /// .NET Core, .NET nanoFramework and even other programming languages.
///
- internal static class QuantityJsonFilesParser
+ /// Repository root directory, where you cloned the repo to such as "c:\dev\UnitsNet".
+ /// The parsed quantities and their units.
+ public static Quantity[] ParseQuantities(string rootDir)
{
- private static readonly JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings
- {
- // Don't override the C# default assigned values if no value is set in JSON
- NullValueHandling = NullValueHandling.Ignore
- };
+ var jsonDir = Path.Combine(rootDir, "Common/UnitDefinitions");
+ var baseQuantityFiles = BaseQuantityFileNames.Select(baseQuantityName => Path.Combine(jsonDir, baseQuantityName + ".json")).ToArray();
- ///
- /// Parses JSON files that define quantities and their units.
- ///
- /// Repository root directory, where you cloned the repo to such as "c:\dev\UnitsNet".
- /// The parsed quantities and their units.
- public static Quantity[] ParseQuantities(string rootDir)
- {
- var jsonDir = Path.Combine(rootDir, "Common/UnitDefinitions");
- var jsonFileNames = Directory.GetFiles(jsonDir, "*.json");
- return jsonFileNames
- .OrderBy(fn => fn, StringComparer.InvariantCultureIgnoreCase)
- .Select(ParseQuantityFile)
- .ToArray();
- }
+ Quantity[] baseQuantities = ParseQuantities(baseQuantityFiles);
+ Quantity[] derivedQuantities = ParseQuantities(Directory.GetFiles(jsonDir, "*.json").Except(baseQuantityFiles));
- private static Quantity ParseQuantityFile(string jsonFileName)
- {
- try
- {
- var quantity = JsonConvert.DeserializeObject(File.ReadAllText(jsonFileName), JsonSerializerSettings)
- ?? throw new UnitsNetCodeGenException($"Unable to parse quantity from JSON file: {jsonFileName}");
-
- AddPrefixUnits(quantity);
- FixConversionFunctionsForDecimalValueTypes(quantity);
- OrderUnitsByName(quantity);
- return quantity;
- }
- catch (Exception e)
- {
- throw new Exception($"Error parsing quantity JSON file: {jsonFileName}", e);
- }
- }
+ return BuildQuantities(baseQuantities, derivedQuantities);
+ }
- private static void OrderUnitsByName(Quantity quantity)
- {
- quantity.Units = quantity.Units.OrderBy(u => u.SingularName, StringComparer.OrdinalIgnoreCase).ToArray();
- }
+ private static Quantity[] ParseQuantities(IEnumerable jsonFiles)
+ {
+ return jsonFiles.Select(ParseQuantity).ToArray();
+ }
- private static void FixConversionFunctionsForDecimalValueTypes(Quantity quantity)
+ private static Quantity ParseQuantity(string jsonFileName)
+ {
+ try
{
- foreach (Unit u in quantity.Units)
- // Use decimal for internal calculations if base type is not double, such as for long or int.
- {
- if (string.Equals(quantity.ValueType, "decimal", StringComparison.OrdinalIgnoreCase))
- {
- // Change any double literals like "1024d" to decimal literals "1024m"
- u.FromUnitToBaseFunc = u.FromUnitToBaseFunc.Replace("d", "m");
- u.FromBaseToUnitFunc = u.FromBaseToUnitFunc.Replace("d", "m");
- }
- }
+ return JsonConvert.DeserializeObject(File.ReadAllText(jsonFileName), JsonSerializerSettings)
+ ?? throw new UnitsNetCodeGenException($"Unable to parse quantity from JSON file: {jsonFileName}");
}
-
- private static void AddPrefixUnits(Quantity quantity)
+ catch (Exception e)
{
- var unitsToAdd = new List();
- foreach (Unit unit in quantity.Units)
- foreach (Prefix prefix in unit.Prefixes)
- {
- try
- {
- var prefixInfo = PrefixInfo.Entries[prefix];
-
- unitsToAdd.Add(new Unit
- {
- SingularName = $"{prefix}{unit.SingularName.ToCamelCase()}", // "Kilo" + "NewtonPerMeter" => "KilonewtonPerMeter"
- PluralName = $"{prefix}{unit.PluralName.ToCamelCase()}", // "Kilo" + "NewtonsPerMeter" => "KilonewtonsPerMeter"
- BaseUnits = null, // Can we determine this somehow?
- FromBaseToUnitFunc = $"({unit.FromBaseToUnitFunc}) / {prefixInfo.Factor}",
- FromUnitToBaseFunc = $"({unit.FromUnitToBaseFunc}) * {prefixInfo.Factor}",
- Localization = GetLocalizationForPrefixUnit(unit.Localization, prefixInfo),
- ObsoleteText = unit.ObsoleteText,
- SkipConversionGeneration = unit.SkipConversionGeneration,
- AllowAbbreviationLookup = unit.AllowAbbreviationLookup
- } );
- }
- catch (Exception e)
- {
- throw new Exception($"Error parsing prefix {prefix} for unit {quantity.Name}.{unit.SingularName}.", e);
- }
- }
-
- quantity.Units = quantity.Units.Concat(unitsToAdd).ToArray();
+ throw new Exception($"Error parsing quantity JSON file: {jsonFileName}", e);
}
+ }
- ///
- /// Create unit abbreviations for a prefix unit, given a unit and the prefix.
- /// The unit abbreviations are either prefixed with the SI prefix or an explicitly configured abbreviation via
- /// .
- ///
- private static Localization[] GetLocalizationForPrefixUnit(IEnumerable localizations, PrefixInfo prefixInfo)
+ ///
+ /// Combines base quantities and derived quantities into a single collection,
+ /// while generating prefixed units for each quantity.
+ ///
+ ///
+ /// The array of base quantities, each containing its respective units.
+ ///
+ ///
+ /// The array of derived quantities, each containing its respective units.
+ ///
+ ///
+ /// An ordered array of all quantities, including both base and derived quantities,
+ /// with prefixed units generated and added to their respective unit collections.
+ ///
+ ///
+ /// This method utilizes the to generate prefixed units
+ /// for each quantity. The resulting quantities are sorted alphabetically by their names.
+ ///
+ private static Quantity[] BuildQuantities(Quantity[] baseQuantities, Quantity[] derivedQuantities)
+ {
+ var prefixBuilder = new UnitPrefixBuilder(FromBaseUnits(baseQuantities.SelectMany(x => x.Units)));
+ return baseQuantities.Concat(derivedQuantities).Select(quantity =>
{
- return localizations.Select(loc =>
- {
- if (loc.TryGetAbbreviationsForPrefix(prefixInfo.Prefix, out string[]? unitAbbreviationsForPrefix))
- {
- return new Localization
- {
- Culture = loc.Culture,
- Abbreviations = unitAbbreviationsForPrefix
- };
- }
-
- // No prefix unit abbreviations are specified, so fall back to prepending the default SI prefix to each unit abbreviation:
- // kilo ("k") + meter ("m") => kilometer ("km")
- var prefix = prefixInfo.GetPrefixForCultureOrSiPrefix(loc.Culture);
- unitAbbreviationsForPrefix = loc.Abbreviations.Select(unitAbbreviation => $"{prefix}{unitAbbreviation}").ToArray();
-
- return new Localization
- {
- Culture = loc.Culture,
- Abbreviations = unitAbbreviationsForPrefix
- };
- }).ToArray();
- }
+ List prefixedUnits = prefixBuilder.GeneratePrefixUnits(quantity);
+ quantity.Units = quantity.Units.Concat(prefixedUnits).OrderBy(unit => unit.SingularName, StringComparer.OrdinalIgnoreCase).ToArray();
+ return quantity;
+ }).OrderBy(quantity => quantity.Name, StringComparer.InvariantCultureIgnoreCase).ToArray();
}
}
diff --git a/CodeGen/Generators/QuantityRelationsParser.cs b/CodeGen/Generators/QuantityRelationsParser.cs
new file mode 100644
index 0000000000..401c7e7b10
--- /dev/null
+++ b/CodeGen/Generators/QuantityRelationsParser.cs
@@ -0,0 +1,213 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using CodeGen.Exceptions;
+using CodeGen.JsonTypes;
+using Newtonsoft.Json;
+
+namespace CodeGen.Generators
+{
+ ///
+ /// Parses the JSON file that defines the relationships (operators) between quantities
+ /// and applies them to the parsed quantity objects.
+ ///
+ internal static class QuantityRelationsParser
+ {
+ ///
+ /// Parse and apply relations to quantities.
+ ///
+ /// The relations are defined in UnitRelations.json
+ /// Each defined relation can be applied multiple times to one or two quantities depending on the operator and the operands.
+ ///
+ /// The format of a relation definition is "Quantity.Unit operator Quantity.Unit = Quantity.Unit" (See examples below).
+ /// "double" can be used as a unitless operand.
+ /// "1" can be used as the result operand to define inverse relations.
+ ///
+ /// Division relations are inferred from multiplication relations,
+ /// but this can be skipped if the string ends with "NoInferredDivision".
+ ///
+ ///
+ /// [
+ /// "1 = Length.Meter * ReciprocalLength.InverseMeter"
+ /// "Power.Watt = ElectricPotential.Volt * ElectricCurrent.Ampere",
+ /// "Mass.Kilogram = MassConcentration.KilogramPerCubicMeter * Volume.CubicMeter -- NoInferredDivision",
+ /// ]
+ ///
+ /// Repository root directory.
+ /// List of previously parsed Quantity objects.
+ public static void ParseAndApplyRelations(string rootDir, Quantity[] quantities)
+ {
+ var quantityDictionary = quantities.ToDictionary(q => q.Name, q => q);
+
+ // Add double and 1 as pseudo-quantities to validate relations that use them.
+ var pseudoQuantity = new Quantity { Name = null!, Units = [new Unit { SingularName = null! }] };
+ quantityDictionary["double"] = pseudoQuantity with { Name = "double" };
+ quantityDictionary["1"] = pseudoQuantity with { Name = "1" };
+
+ var relations = ParseRelations(rootDir, quantityDictionary);
+
+ // Because multiplication is commutative, we can infer the other operand order.
+ relations.AddRange(relations
+ .Where(r => r.Operator is "*" or "inverse" && r.LeftQuantity != r.RightQuantity)
+ .Select(r => r with
+ {
+ LeftQuantity = r.RightQuantity,
+ LeftUnit = r.RightUnit,
+ RightQuantity = r.LeftQuantity,
+ RightUnit = r.LeftUnit,
+ })
+ .ToList());
+
+ // We can infer division relations from multiplication relations.
+ relations.AddRange(relations
+ .Where(r => r is { Operator: "*", NoInferredDivision: false })
+ .Select(r => r with
+ {
+ Operator = "/",
+ LeftQuantity = r.ResultQuantity,
+ LeftUnit = r.ResultUnit,
+ ResultQuantity = r.LeftQuantity,
+ ResultUnit = r.LeftUnit,
+ })
+ // Skip division between equal quantities because the ratio is already generated as part of the Arithmetic Operators.
+ .Where(r => r.LeftQuantity != r.RightQuantity)
+ .ToList());
+
+ // Sort all relations to keep generated operators in a consistent order.
+ relations.Sort();
+
+ var duplicates = relations
+ .GroupBy(r => r.SortString)
+ .Where(g => g.Count() > 1)
+ .Select(g => g.Key)
+ .ToList();
+
+ if (duplicates.Any())
+ {
+ var list = string.Join("\n ", duplicates);
+ throw new UnitsNetCodeGenException($"Duplicate inferred relations:\n {list}");
+ }
+
+ var ambiguous = relations
+ .GroupBy(r => $"{r.LeftQuantity.Name} {r.Operator} {r.RightQuantity.Name}")
+ .Where(g => g.Count() > 1)
+ .Select(g => g.Key)
+ .ToList();
+
+ if (ambiguous.Any())
+ {
+ var list = string.Join("\n ", ambiguous);
+ throw new UnitsNetCodeGenException($"Ambiguous inferred relations:\n {list}\n\nHint: you could use NoInferredDivision in the definition file.");
+ }
+
+ foreach (var quantity in quantities)
+ {
+ var quantityRelations = new List();
+
+ foreach (var relation in relations)
+ {
+ if (relation.LeftQuantity == quantity)
+ {
+ // The left operand of a relation is responsible for generating the operator.
+ quantityRelations.Add(relation);
+ }
+ else if (relation.RightQuantity == quantity && relation.LeftQuantity.Name is "double")
+ {
+ // Because we cannot add operators to double we make the right operand responsible in this case.
+ quantityRelations.Add(relation);
+ }
+ }
+
+ quantity.Relations = quantityRelations.ToArray();
+ }
+ }
+
+ private static List ParseRelations(string rootDir, IReadOnlyDictionary quantities)
+ {
+ var relationsFileName = Path.Combine(rootDir, "Common/UnitRelations.json");
+
+ try
+ {
+ var text = File.ReadAllText(relationsFileName);
+ var relationStrings = JsonConvert.DeserializeObject>(text) ?? [];
+
+ var parsedRelations = relationStrings.Select(relationString => ParseRelation(relationString, quantities)).ToList();
+
+ // File parsed successfully, save it back to disk in the sorted state.
+ File.WriteAllText(relationsFileName, JsonConvert.SerializeObject(relationStrings, Formatting.Indented));
+
+ return parsedRelations;
+ }
+ catch (Exception e)
+ {
+ throw new UnitsNetCodeGenException($"Error parsing relations file: {relationsFileName}", e);
+ }
+ }
+
+ private static QuantityRelation ParseRelation(string relationString, IReadOnlyDictionary quantities)
+ {
+ var segments = relationString.Split(' ');
+
+ if (segments is not [_, "=", _, "*", _, ..])
+ {
+ throw new Exception($"Invalid relation string: {relationString}");
+ }
+
+ var @operator = segments[3];
+ var left = segments[2].Split('.');
+ var right = segments[4].Split('.');
+ var result = segments[0].Split('.');
+
+ var leftQuantity = GetQuantity(left[0]);
+ var rightQuantity = GetQuantity(right[0]);
+ var resultQuantity = GetQuantity(result[0]);
+
+ var leftUnit = GetUnit(leftQuantity, left.ElementAtOrDefault(1));
+ var rightUnit = GetUnit(rightQuantity, right.ElementAtOrDefault(1));
+ var resultUnit = GetUnit(resultQuantity, result.ElementAtOrDefault(1));
+
+ if (resultQuantity.Name == "1")
+ {
+ @operator = "inverse";
+ }
+
+ return new QuantityRelation
+ {
+ NoInferredDivision = segments.Contains("NoInferredDivision"),
+ Operator = @operator,
+ LeftQuantity = leftQuantity,
+ LeftUnit = leftUnit,
+ RightQuantity = rightQuantity,
+ RightUnit = rightUnit,
+ ResultQuantity = resultQuantity,
+ ResultUnit = resultUnit
+ };
+
+ Quantity GetQuantity(string quantityName)
+ {
+ if (!quantities.TryGetValue(quantityName, out var quantity))
+ {
+ throw new Exception($"Undefined quantity {quantityName} in relation string: {relationString}");
+ }
+
+ return quantity;
+ }
+
+ Unit GetUnit(Quantity quantity, string? unitName)
+ {
+ try
+ {
+ return quantity.Units.First(u => u.SingularName == unitName);
+ }
+ catch (InvalidOperationException)
+ {
+ throw new Exception($"Undefined unit {unitName} in relation string: {relationString}");
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
index 750d30125c..4765e49d9e 100644
--- a/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/NumberExtensionsGenerator.cs
@@ -40,7 +40,7 @@ public static class NumberTo{_quantityName}Extensions
continue;
Writer.WL(2, $@"
-/// ");
+/// ");
// Include obsolete text from the quantity per extension method, to make it visible when the class is not explicitly referenced in code.
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit.ObsoleteText ?? _quantity.ObsoleteText));
@@ -49,8 +49,11 @@ public static class NumberTo{_quantityName}Extensions
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => {_quantityName}.From{unit.PluralName}(double.CreateChecked(value));
+#else
+ , IConvertible
+ => {_quantityName}.From{unit.PluralName}(value.ToDouble(null));
#endif
- => {_quantityName}.From{unit.PluralName}(Convert.ToDouble(value));
");
}
diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
index 5942581dd5..0238c804ae 100644
--- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs
@@ -14,7 +14,6 @@ internal class QuantityGenerator : GeneratorBase
private readonly bool _isDimensionless;
private readonly string _unitEnumName;
- private readonly string _valueType;
private readonly Unit _baseUnit;
public QuantityGenerator(Quantity quantity)
@@ -25,7 +24,6 @@ public QuantityGenerator(Quantity quantity)
throw new ArgumentException($"No unit found with SingularName equal to BaseUnit [{_quantity.BaseUnit}]. This unit must be defined.",
nameof(quantity));
- _valueType = quantity.ValueType;
_unitEnumName = $"{quantity.Name}Unit";
BaseDimensions baseDimensions = quantity.BaseDimensions;
@@ -42,8 +40,10 @@ public string Generate()
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
-using UnitsNet.InternalHelpers;
using UnitsNet.Units;
+#if NET
+using System.Numerics;
+#endif
#nullable enable
@@ -67,12 +67,42 @@ namespace UnitsNet
[DataContract]
[DebuggerTypeProxy(typeof(QuantityDisplay))]
public readonly partial struct {_quantity.Name} :
- {(_quantity.GenerateArithmetic ? "IArithmeticQuantity" : "IQuantity")}<{_quantity.Name}, {_unitEnumName}, {_quantity.ValueType}>,");
+ {(_quantity.GenerateArithmetic ? "IArithmeticQuantity" : "IQuantity")}<{_quantity.Name}, {_unitEnumName}>,");
- if (_quantity.ValueType == "decimal") Writer.WL(@$"
- IDecimalQuantity,");
+ if (_quantity.Relations.Any(r => r.Operator is "*" or "/"))
+ {
+ Writer.WL(@$"
+#if NET7_0_OR_GREATER");
+ foreach (var relation in _quantity.Relations)
+ {
+ if (relation.LeftQuantity == _quantity)
+ {
+ switch (relation.Operator)
+ {
+ case "*":
+ Writer.W(@"
+ IMultiplyOperators");
+ break;
+ case "/":
+ Writer.W(@"
+ IDivisionOperators");
+ break;
+ default:
+ continue;
+ }
+ Writer.WL($"<{relation.LeftQuantity.Name}, {relation.RightQuantity.Name}, {relation.ResultQuantity.Name}>,");
+ }
+ }
+
+ Writer.WL(@$"
+#endif");
+ }
Writer.WL(@$"
+#if NET7_0_OR_GREATER
+ IComparisonOperators<{_quantity.Name}, {_quantity.Name}, bool>,
+ IParsable<{_quantity.Name}>,
+#endif
IComparable,
IComparable<{_quantity.Name}>,
IConvertible,
@@ -85,7 +115,7 @@ namespace UnitsNet
/// The numeric value this quantity was constructed with.
///
[DataMember(Name = ""Value"", Order = 1)]
- private readonly {_quantity.ValueType} _value;
+ private readonly double _value;
///
/// The unit this quantity was constructed with.
@@ -102,6 +132,7 @@ namespace UnitsNet
GenerateStaticFactoryMethods();
GenerateStaticParseMethods();
GenerateArithmeticOperators();
+ GenerateRelationalOperators();
GenerateEqualityAndComparison();
GenerateConversionMethods();
GenerateToString();
@@ -176,18 +207,17 @@ private void GenerateInstanceConstructors()
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public {_quantity.Name}({_quantity.ValueType} value, {_unitEnumName} unit)
+ public {_quantity.Name}(double value, {_unitEnumName} unit)
{{");
- Writer.WL(_quantity.ValueType == "double"
- ? @"
- _value = Guard.EnsureValidNumber(value, nameof(value));"
- : @"
+ Writer.WL(@"
_value = value;");
Writer.WL($@"
_unit = unit;
}}
-
+");
+ if (!_isDimensionless)
+ {
+ Writer.WL($@"
///
/// Creates an instance of the quantity with the given numeric value in units compatible with the given .
/// If multiple compatible units were found, the first match is used.
@@ -196,23 +226,13 @@ private void GenerateInstanceConstructors()
/// The unit system to create the quantity with.
/// The given is null.
/// No unit was found for the given .
- public {_quantity.Name}({_valueType} value, UnitSystem unitSystem)
+ public {_quantity.Name}(double value, UnitSystem unitSystem)
{{
- if (unitSystem is null) throw new ArgumentNullException(nameof(unitSystem));
-
- var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits);
- var firstUnitInfo = unitInfos.FirstOrDefault();
-");
-
- Writer.WL(_quantity.ValueType == "double"
- ? @"
- _value = Guard.EnsureValidNumber(value, nameof(value));"
- : @"
- _value = value;");
- Writer.WL($@"
- _unit = firstUnitInfo?.Value ?? throw new ArgumentException(""No units were found for the given UnitSystem."", nameof(unitSystem));
+ _value = value;
+ _unit = Info.GetDefaultUnit(unitSystem);
}}
");
+ }
}
private void GenerateStaticProperties()
@@ -270,10 +290,10 @@ private void GenerateProperties()
///
/// The numeric value this quantity was constructed with.
///
- public {_valueType} Value => _value;
+ public double Value => _value;
///
- QuantityValue IQuantity.Value => _value;
+ double IQuantity.Value => _value;
Enum IQuantity.Unit => Unit;
@@ -306,11 +326,11 @@ private void GenerateConversionProperties()
Writer.WL($@"
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
/// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public {_quantity.ValueType} {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
+ public double {unit.PluralName} => As({_unitEnumName}.{unit.SingularName});
");
}
@@ -395,17 +415,14 @@ private void GenerateStaticFactoryMethods()
{
if (unit.SkipConversionGeneration) continue;
- var valueParamName = unit.PluralName.ToLowerInvariant();
Writer.WL($@"
///
/// Creates a from .
- ///
- /// If value is NaN or Infinity. ");
+ /// ");
Writer.WLIfText(2, GetObsoleteAttributeOrNull(unit));
Writer.WL($@"
- public static {_quantity.Name} From{unit.PluralName}(QuantityValue {valueParamName})
+ public static {_quantity.Name} From{unit.PluralName}(double value)
{{
- {_valueType} value = ({_valueType}) {valueParamName};
return new {_quantity.Name}(value, {_unitEnumName}.{unit.SingularName});
}}
");
@@ -418,9 +435,9 @@ private void GenerateStaticFactoryMethods()
/// Value to convert from.
/// Unit to convert from.
/// {_quantity.Name} unit value.
- public static {_quantity.Name} From(QuantityValue value, {_unitEnumName} fromUnit)
+ public static {_quantity.Name} From(double value, {_unitEnumName} fromUnit)
{{
- return new {_quantity.Name}(({_valueType})value, fromUnit);
+ return new {_quantity.Name}(value, fromUnit);
}}
#endregion
@@ -498,7 +515,7 @@ private void GenerateStaticParseMethods()
///
/// Length.Parse(""5.5 m"", CultureInfo.GetCultureInfo(""en-US""));
///
- public static bool TryParse(string? str, out {_quantity.Name} result)
+ public static bool TryParse([NotNullWhen(true)]string? str, out {_quantity.Name} result)
{{
return TryParse(str, null, out result);
}}
@@ -513,7 +530,7 @@ public static bool TryParse(string? str, out {_quantity.Name} result)
/// Length.Parse(""5.5 m"", CultureInfo.GetCultureInfo(""en-US""));
///
/// Format to use when parsing number and unit. Defaults to if null.
- public static bool TryParse(string? str, IFormatProvider? provider, out {_quantity.Name} result)
+ public static bool TryParse([NotNullWhen(true)]string? str, IFormatProvider? provider, out {_quantity.Name} result)
{{
return UnitsNetSetup.Default.QuantityParser.TryParse<{_quantity.Name}, {_unitEnumName}>(
str,
@@ -552,7 +569,7 @@ public static bool TryParse(string? str, IFormatProvider? provider, out {_quanti
}}
///
- public static bool TryParseUnit(string str, out {_unitEnumName} unit)
+ public static bool TryParseUnit([NotNullWhen(true)]string? str, out {_unitEnumName} unit)
{{
return TryParseUnit(str, null, out unit);
}}
@@ -567,7 +584,7 @@ public static bool TryParseUnit(string str, out {_unitEnumName} unit)
/// Length.TryParseUnit(""m"", CultureInfo.GetCultureInfo(""en-US""));
///
/// Format to use when parsing number and unit. Defaults to if null.
- public static bool TryParseUnit(string str, IFormatProvider? provider, out {_unitEnumName} unit)
+ public static bool TryParseUnit([NotNullWhen(true)]string? str, IFormatProvider? provider, out {_unitEnumName} unit)
{{
return UnitsNetSetup.Default.UnitParser.TryParse<{_unitEnumName}>(str, provider, out unit);
}}
@@ -609,25 +626,25 @@ private void GenerateArithmeticOperators()
}}
/// Get from multiplying value and .
- public static {_quantity.Name} operator *({_valueType} left, {_quantity.Name} right)
+ public static {_quantity.Name} operator *(double left, {_quantity.Name} right)
{{
return new {_quantity.Name}(left * right.Value, right.Unit);
}}
/// Get from multiplying value and .
- public static {_quantity.Name} operator *({_quantity.Name} left, {_valueType} right)
+ public static {_quantity.Name} operator *({_quantity.Name} left, double right)
{{
return new {_quantity.Name}(left.Value * right, left.Unit);
}}
/// Get from dividing by value.
- public static {_quantity.Name} operator /({_quantity.Name} left, {_valueType} right)
+ public static {_quantity.Name} operator /({_quantity.Name} left, double right)
{{
return new {_quantity.Name}(left.Value / right, left.Unit);
}}
/// Get ratio value from dividing by .
- public static {_quantity.ValueType} operator /({_quantity.Name} left, {_quantity.Name} right)
+ public static double operator /({_quantity.Name} left, {_quantity.Name} right)
{{
return left.{_baseUnit.PluralName} / right.{_baseUnit.PluralName};
}}
@@ -667,7 +684,7 @@ private void GenerateLogarithmicArithmeticOperators()
}}
/// Get from logarithmic multiplication of value and .
- public static {_quantity.Name} operator *({_valueType} left, {_quantity.Name} right)
+ public static {_quantity.Name} operator *(double left, {_quantity.Name} right)
{{
// Logarithmic multiplication = addition
return new {_quantity.Name}(left + right.Value, right.Unit);
@@ -677,14 +694,14 @@ private void GenerateLogarithmicArithmeticOperators()
public static {_quantity.Name} operator *({_quantity.Name} left, double right)
{{
// Logarithmic multiplication = addition
- return new {_quantity.Name}(left.Value + ({_valueType})right, left.Unit);
+ return new {_quantity.Name}(left.Value + right, left.Unit);
}}
/// Get from logarithmic division of by value.
public static {_quantity.Name} operator /({_quantity.Name} left, double right)
{{
// Logarithmic division = subtraction
- return new {_quantity.Name}(left.Value - ({_valueType})right, left.Unit);
+ return new {_quantity.Name}(left.Value - right, left.Unit);
}}
/// Get ratio value from logarithmic division of by .
@@ -698,6 +715,79 @@ private void GenerateLogarithmicArithmeticOperators()
" );
}
+ ///
+ /// Generates operators that express relations between quantities as applied by .
+ ///
+ private void GenerateRelationalOperators()
+ {
+ if (!_quantity.Relations.Any()) return;
+
+ Writer.WL($@"
+ #region Relational Operators
+");
+
+ foreach (QuantityRelation relation in _quantity.Relations)
+ {
+ if (relation.Operator == "inverse")
+ {
+ Writer.WL($@"
+ /// Calculates the inverse of this quantity.
+ /// The corresponding inverse quantity, .
+ public {relation.RightQuantity.Name} Inverse()
+ {{
+ return {relation.LeftUnit.PluralName} == 0.0 ? {relation.RightQuantity.Name}.Zero : {relation.RightQuantity.Name}.From{relation.RightUnit.PluralName}(1 / {relation.LeftUnit.PluralName});
+ }}
+");
+ }
+ else
+ {
+ var leftParameter = relation.LeftQuantity.Name.ToCamelCase();
+ var leftConversionProperty = relation.LeftUnit.PluralName;
+ var rightParameter = relation.RightQuantity.Name.ToCamelCase();
+ var rightConversionProperty = relation.RightUnit.PluralName;
+
+ if (leftParameter == rightParameter)
+ {
+ leftParameter = "left";
+ rightParameter = "right";
+ }
+
+ var leftPart = $"{leftParameter}.{leftConversionProperty}";
+ var rightPart = $"{rightParameter}.{rightConversionProperty}";
+
+ if (leftParameter is "double")
+ {
+ leftParameter = leftPart = "value";
+ }
+
+ if (rightParameter is "double")
+ {
+ rightParameter = rightPart = "value";
+ }
+
+ var expression = $"{leftPart} {relation.Operator} {rightPart}";
+
+ if (relation.ResultQuantity.Name is not "double")
+ {
+ expression = $"{relation.ResultQuantity.Name}.From{relation.ResultUnit.PluralName}({expression})";
+ }
+
+ Writer.WL($@"
+ /// Get from {relation.Operator} .
+ public static {relation.ResultQuantity.Name} operator {relation.Operator}({relation.LeftQuantity.Name} {leftParameter}, {relation.RightQuantity.Name} {rightParameter})
+ {{
+ return {expression};
+ }}
+");
+ }
+ }
+
+ Writer.WL($@"
+
+ #endregion
+");
+ }
+
private void GenerateEqualityAndComparison()
{
Writer.WL($@"
@@ -835,7 +925,7 @@ public int CompareTo({_quantity.Name} other)
///
///
/// Note that it is advised against specifying zero difference, due to the nature
- /// of floating-point operations and using {_valueType} internally.
+ /// of floating-point operations and using double internally.
///
///
/// The other quantity to compare to.
@@ -843,7 +933,7 @@ public int CompareTo({_quantity.Name} other)
/// The comparison type: either relative or absolute.
/// True if the absolute difference between the two values is not greater than the specified relative or absolute tolerance.
[Obsolete(""Use Equals({_quantity.Name} other, {_quantity.Name} tolerance) instead, to check equality across units and to specify the max tolerance for rounding errors due to floating-point arithmetic when converting between units."")]
- public bool Equals({_quantity.Name} other, {_quantity.ValueType} tolerance, ComparisonType comparisonType)
+ public bool Equals({_quantity.Name} other, double tolerance, ComparisonType comparisonType)
{{
if (tolerance < 0)
throw new ArgumentOutOfRangeException(nameof(tolerance), ""Tolerance must be greater than or equal to 0."");
@@ -897,7 +987,7 @@ private void GenerateConversionMethods()
/// Convert to the unit representation .
///
/// Value converted to the specified unit.
- public {_quantity.ValueType} As({_unitEnumName} unit)
+ public double As({_unitEnumName} unit)
{{
if (Unit == unit)
return Value;
@@ -906,65 +996,16 @@ private void GenerateConversionMethods()
}}
");
- if (_quantity.ValueType == "decimal")
- {
- Writer.WL($@"
-
- double IQuantity<{_unitEnumName}>.As({_unitEnumName} unit)
- {{
- return (double)As(unit);
- }}
-");
- }
-
- Writer.WL($@"
+ Writer.WL( $@"
///
- public {_quantity.ValueType} As(UnitSystem unitSystem)
- {{
- if (unitSystem is null)
- throw new ArgumentNullException(nameof(unitSystem));
-
- var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits);
-
- var firstUnitInfo = unitInfos.FirstOrDefault();
- if (firstUnitInfo == null)
- throw new ArgumentException(""No units were found for the given UnitSystem."", nameof(unitSystem));
-
- return As(firstUnitInfo.Value);
- }}
-");
-
- if (_quantity.ValueType == "decimal")
- {
- Writer.WL($@"
- ///
- double IQuantity.As(UnitSystem unitSystem)
+ public double As(UnitSystem unitSystem)
{{
- return (double)As(unitSystem);
+ return As(Info.GetDefaultUnit(unitSystem));
}}
");
- }
Writer.WL($@"
- ///
- double IQuantity.As(Enum unit)
- {{
- if (!(unit is {_unitEnumName} typedUnit))
- throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
-
- return (double)As(typedUnit);
- }}
-
- ///
- {_quantity.ValueType} IValueQuantity<{_quantity.ValueType}>.As(Enum unit)
- {{
- if (!(unit is {_unitEnumName} typedUnit))
- throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
-
- return As(typedUnit);
- }}
-
///
/// Converts this {_quantity.Name} to another {_quantity.Name} with the unit representation .
///
@@ -1060,29 +1101,33 @@ private bool TryToUnit({_unitEnumName} unit, [NotNullWhen(true)] out {_quantity.
converted = convertedOrNull.Value;
return true;
}}
+");
+ Writer.WL($@"
+ ///
+ public {_quantity.Name} ToUnit(UnitSystem unitSystem)
+ {{
+ return ToUnit(Info.GetDefaultUnit(unitSystem));
+ }}
+");
- ///
- IQuantity IQuantity.ToUnit(Enum unit)
+ Writer.WL($@"
+ #region Explicit implementations
+
+ double IQuantity.As(Enum unit)
{{
- if (!(unit is {_unitEnumName} typedUnit))
+ if (unit is not {_unitEnumName} typedUnit)
throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
- return ToUnit(typedUnit, DefaultConversionFunctions);
+ return As(typedUnit);
}}
- ///
- public {_quantity.Name} ToUnit(UnitSystem unitSystem)
+ ///
+ IQuantity IQuantity.ToUnit(Enum unit)
{{
- if (unitSystem is null)
- throw new ArgumentNullException(nameof(unitSystem));
-
- var unitInfos = Info.GetUnitInfosFor(unitSystem.BaseUnits);
-
- var firstUnitInfo = unitInfos.FirstOrDefault();
- if (firstUnitInfo == null)
- throw new ArgumentException(""No units were found for the given UnitSystem."", nameof(unitSystem));
+ if (!(unit is {_unitEnumName} typedUnit))
+ throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
- return ToUnit(firstUnitInfo.Value);
+ return ToUnit(typedUnit, DefaultConversionFunctions);
}}
///
@@ -1094,17 +1139,7 @@ IQuantity IQuantity.ToUnit(Enum unit)
///
IQuantity<{_unitEnumName}> IQuantity<{_unitEnumName}>.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
- ///
- IValueQuantity<{_quantity.ValueType}> IValueQuantity<{_quantity.ValueType}>.ToUnit(Enum unit)
- {{
- if (unit is not {_unitEnumName} typedUnit)
- throw new ArgumentException($""The given unit is of type {{unit.GetType()}}. Only {{typeof({_unitEnumName})}} is supported."", nameof(unit));
-
- return ToUnit(typedUnit);
- }}
-
- ///
- IValueQuantity<{_quantity.ValueType}> IValueQuantity<{_quantity.ValueType}>.ToUnit(UnitSystem unitSystem) => ToUnit(unitSystem);
+ #endregion
#endregion
");
@@ -1121,7 +1156,7 @@ private void GenerateToString()
/// String representation.
public override string ToString()
{{
- return ToString(""g"");
+ return ToString(null, null);
}}
///
@@ -1131,7 +1166,7 @@ public override string ToString()
/// Format to use for localization and number formatting. Defaults to if null.
public string ToString(IFormatProvider? provider)
{{
- return ToString(""g"", provider);
+ return ToString(null, provider);
}}
///
@@ -1142,7 +1177,7 @@ public string ToString(IFormatProvider? provider)
/// The string representation.
public string ToString(string? format)
{{
- return ToString(format, CultureInfo.CurrentCulture);
+ return ToString(format, null);
}}
///
@@ -1228,7 +1263,7 @@ float IConvertible.ToSingle(IFormatProvider? provider)
string IConvertible.ToString(IFormatProvider? provider)
{{
- return ToString(""g"", provider);
+ return ToString(null, provider);
}}
object IConvertible.ToType(Type conversionType, IFormatProvider? provider)
diff --git a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
index b266926ed6..69443fa2d5 100644
--- a/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/StaticQuantityGenerator.cs
@@ -49,7 +49,7 @@ public partial class Quantity
/// The of the quantity to create.
/// The value to construct the quantity with.
/// The created quantity.
- public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValue value)
+ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, double value)
{
return quantityInfo.Name switch
{");
@@ -72,7 +72,7 @@ public static IQuantity FromQuantityInfo(QuantityInfo quantityInfo, QuantityValu
/// Unit enum value.
/// The resulting quantity if successful, otherwise default .
/// True if successful with assigned the value, otherwise false .
- public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity)
+ public static bool TryFrom(double value, Enum? unit, [NotNullWhen(true)] out IQuantity? quantity)
{
quantity = unit switch
{");
@@ -100,7 +100,7 @@ public static bool TryFrom(QuantityValue value, Enum? unit, [NotNullWhen(true)]
/// Quantity string representation, such as ""1.5 kg"". Must be compatible with given quantity type.
/// The resulting quantity if successful, otherwise default .
/// The parsed quantity.
- public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, string quantityString, [NotNullWhen(true)] out IQuantity? quantity)
+ public static bool TryParse(IFormatProvider? formatProvider, Type quantityType, [NotNullWhen(true)] string? quantityString, [NotNullWhen(true)] out IQuantity? quantity)
{
quantity = default(IQuantity);
diff --git a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
index 7ab9d998c8..625e9a8661 100644
--- a/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGen/UnitTestBaseClassGenerator.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Linq;
using CodeGen.JsonTypes;
@@ -40,11 +41,6 @@ internal class UnitTestBaseClassGenerator : GeneratorBase
///
private readonly string _baseUnitFullName;
- ///
- /// Constructors for decimal-backed quantities require decimal numbers as input, so add the "m" suffix to numbers when constructing those quantities.
- ///
- private readonly string _numberSuffix;
-
///
/// Other unit, if more than one unit exists for quantity, otherwise same as .
///
@@ -54,6 +50,46 @@ internal class UnitTestBaseClassGenerator : GeneratorBase
/// Example: "LengthUnit.Centimeter".
///
private readonly string _otherOrBaseUnitFullName;
+
+ ///
+ /// Indicates whether the quantity is dimensionless.
+ ///
+ ///
+ /// A dimensionless quantity has all base dimensions (L, M, T, I, Θ, N, J) equal to zero.
+ ///
+ private readonly bool _isDimensionless;
+
+ ///
+ /// Stores a mapping of culture names to their corresponding unique unit abbreviations.
+ /// Each culture maps to a dictionary where the key is the unit abbreviation and the value is the corresponding
+ /// .
+ /// This ensures that unit abbreviations are unique within the context of a specific culture.
+ ///
+ ///
+ /// Used for testing culture-specific parsing with non-ambiguous (unique) abbreviations.
+ ///
+ private readonly Dictionary> _uniqueAbbreviationsForCulture;
+
+ ///
+ /// Stores a mapping of culture names to their respective ambiguous unit abbreviations.
+ /// Each culture maps to a dictionary where the key is the ambiguous abbreviation, and the value is a list of
+ /// objects
+ /// that share the same abbreviation within that culture.
+ ///
+ ///
+ /// This field is used to identify and handle unit abbreviations that are not unique within a specific culture.
+ /// Ambiguities arise when multiple units share the same abbreviation, requiring additional logic to resolve.
+ ///
+ private readonly Dictionary>> _ambiguousAbbreviationsForCulture;
+
+ ///
+ /// The default or fallback culture for unit localizations.
+ ///
+ ///
+ /// This culture, "en-US", is used as a fallback when a specific
+ /// is not available for the defined unit localizations.
+ ///
+ private const string FallbackCultureName = "en-US";
public UnitTestBaseClassGenerator(Quantity quantity)
{
@@ -66,11 +102,57 @@ public UnitTestBaseClassGenerator(Quantity quantity)
_baseUnitEnglishAbbreviation = GetEnglishAbbreviation(_baseUnit);
_baseUnitFullName = $"{_unitEnumName}.{_baseUnit.SingularName}";
- _numberSuffix = quantity.ValueType == "decimal" ? "m" : "";
// Try to pick another unit, or fall back to base unit if only a single unit.
_otherOrBaseUnit = quantity.Units.Where(u => u != _baseUnit).DefaultIfEmpty(_baseUnit).First();
_otherOrBaseUnitFullName = $"{_unitEnumName}.{_otherOrBaseUnit.SingularName}";
+ _isDimensionless = quantity.BaseDimensions is { L: 0, M: 0, T: 0, I: 0, Θ: 0, N: 0, J: 0 };
+
+ var abbreviationsForCulture = new Dictionary>>();
+ foreach (Unit unit in quantity.Units)
+ {
+ if (unit.ObsoleteText != null)
+ {
+ continue;
+ }
+
+ foreach (Localization localization in unit.Localization)
+ {
+ if (!abbreviationsForCulture.TryGetValue(localization.Culture, out Dictionary>? localizationsForCulture))
+ {
+ abbreviationsForCulture[localization.Culture] = localizationsForCulture = new Dictionary>();
+ }
+
+ foreach (var abbreviation in localization.Abbreviations)
+ {
+ if (localizationsForCulture.TryGetValue(abbreviation, out List? matchingUnits))
+ {
+ matchingUnits.Add(unit);
+ }
+ else
+ {
+ localizationsForCulture[abbreviation] = [unit];
+ }
+ }
+ }
+ }
+
+ _uniqueAbbreviationsForCulture = new Dictionary>();
+ _ambiguousAbbreviationsForCulture = new Dictionary>>();
+ foreach ((var cultureName, Dictionary>? abbreviations) in abbreviationsForCulture)
+ {
+ var uniqueAbbreviations = abbreviations.Where(pair => pair.Value.Count == 1).ToDictionary(pair => pair.Key, pair => pair.Value[0]);
+ if (uniqueAbbreviations.Count != 0)
+ {
+ _uniqueAbbreviationsForCulture.Add(cultureName, uniqueAbbreviations);
+ }
+
+ var ambiguousAbbreviations = abbreviations.Where(pair => pair.Value.Count > 1).ToDictionary();
+ if (ambiguousAbbreviations.Count != 0)
+ {
+ _ambiguousAbbreviationsForCulture.Add(cultureName, ambiguousAbbreviations);
+ }
+ }
}
private string GetUnitFullName(Unit unit) => $"{_unitEnumName}.{unit.SingularName}";
@@ -118,7 +200,7 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
if (unit.SkipConversionGeneration) continue;
Writer.WL($@"
- protected abstract {_quantity.ValueType} {unit.PluralName}InOne{_baseUnit.SingularName} {{ get; }}");
+ protected abstract double {unit.PluralName}InOne{_baseUnit.SingularName} {{ get; }}");
}
Writer.WL();
@@ -129,12 +211,12 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
if (unit.SkipConversionGeneration) continue;
Writer.WL($@"
- protected virtual {_quantity.ValueType} {unit.PluralName}Tolerance {{ get {{ return { (_quantity.ValueType == "decimal" ? "1e-9m" : "1e-5") }; }} }}");
+ protected virtual double {unit.PluralName}Tolerance {{ get {{ return 1e-5; }} }}");
}
Writer.WL($@"
// ReSharper restore VirtualMemberNeverOverriden.Global
- protected ({_quantity.ValueType} UnitsInBaseUnit, {_quantity.ValueType} Tolerence) GetConversionFactor({_unitEnumName} unit)
+ protected (double UnitsInBaseUnit, double Tolerence) GetConversionFactor({_unitEnumName} unit)
{{
return unit switch
{{");
@@ -163,27 +245,31 @@ public abstract partial class {_quantity.Name}TestsBase : QuantityTestsBase
public void DefaultCtor_ReturnsQuantityWithZeroValueAndBaseUnit()
{{
var quantity = new {_quantity.Name}();
- Assert.Equal(0, quantity.Value);");
- if (_quantity.ValueType == "decimal") Writer.WL(@"
- Assert.Equal(0m, ((IValueQuantity)quantity).Value);");
- Writer.WL($@"
+ Assert.Equal(0, quantity.Value);
Assert.Equal({_baseUnitFullName}, quantity.Unit);
}}
-");
- if (_quantity.ValueType == "double") Writer.WL($@"
+
[Fact]
- public void Ctor_WithInfinityValue_ThrowsArgumentException()
+ public void Ctor_WithInfinityValue_DoNotThrowsArgumentException()
{{
- Assert.Throws(() => new {_quantity.Name}(double.PositiveInfinity, {_baseUnitFullName}));
- Assert.Throws(() => new {_quantity.Name}(double.NegativeInfinity, {_baseUnitFullName}));
+ var exception1 = Record.Exception(() => new {_quantity.Name}(double.PositiveInfinity, {_baseUnitFullName}));
+ var exception2 = Record.Exception(() => new {_quantity.Name}(double.NegativeInfinity, {_baseUnitFullName}));
+
+ Assert.Null(exception1);
+ Assert.Null(exception2);
}}
[Fact]
- public void Ctor_WithNaNValue_ThrowsArgumentException()
+ public void Ctor_WithNaNValue_DoNotThrowsArgumentException()
{{
- Assert.Throws(() => new {_quantity.Name}(double.NaN, {_baseUnitFullName}));
+ var exception = Record.Exception(() => new {_quantity.Name}(double.NaN, {_baseUnitFullName}));
+
+ Assert.Null(exception);
}}
-"); Writer.WL($@"
+");
+ if (!_isDimensionless)
+ {
+ Writer.WL($@"
[Fact]
public void Ctor_NullAsUnitSystem_ThrowsArgumentNullException()
@@ -192,20 +278,24 @@ public void Ctor_NullAsUnitSystem_ThrowsArgumentNullException()
}}
[Fact]
- public void Ctor_SIUnitSystem_ThrowsArgumentExceptionIfNotSupported()
+ public virtual void Ctor_SIUnitSystem_ReturnsQuantityWithSIUnits()
{{
- Func TestCode = () => new {_quantity.Name}(value: 1, unitSystem: UnitSystem.SI);
- if (SupportsSIUnitSystem)
- {{
- var quantity = ({_quantity.Name}) TestCode();
- Assert.Equal(1, quantity.Value);
- }}
- else
- {{
- Assert.Throws(TestCode);
- }}
+ var quantity = new {_quantity.Name}(value: 1, unitSystem: UnitSystem.SI);
+ Assert.Equal(1, quantity.Value);
+ Assert.True(quantity.QuantityInfo.UnitInfos.First(x => x.Value == quantity.Unit).BaseUnits.IsSubsetOf(UnitSystem.SI.BaseUnits));
}}
+ [Fact]
+ public void Ctor_UnitSystem_ThrowsArgumentExceptionIfNotSupported()
+ {{
+ var unsupportedUnitSystem = new UnitSystem(UnsupportedBaseUnits);
+ Assert.Throws(() => new {_quantity.Name}(value: 1, unitSystem: unsupportedUnitSystem));
+ }}
+");
+ }
+
+ Writer.WL($@"
+
[Fact]
public void {_quantity.Name}_QuantityInfo_ReturnsQuantityInfoDescribingQuantity()
{{
@@ -246,21 +336,24 @@ public void From_ValueAndUnit_ReturnsQuantityWithSameValueAndUnit()
}
Writer.WL($@"
}}
-");
- if (_quantity.ValueType == "double") Writer.WL($@"
+
[Fact]
- public void From{_baseUnit.PluralName}_WithInfinityValue_ThrowsArgumentException()
+ public void From{_baseUnit.PluralName}_WithInfinityValue_DoNotThrowsArgumentException()
{{
- Assert.Throws(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.PositiveInfinity));
- Assert.Throws(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.NegativeInfinity));
+ var exception1 = Record.Exception(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.PositiveInfinity));
+ var exception2 = Record.Exception(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.NegativeInfinity));
+
+ Assert.Null(exception1);
+ Assert.Null(exception2);
}}
[Fact]
- public void From{_baseUnit.PluralName}_WithNanValue_ThrowsArgumentException()
+ public void From{_baseUnit.PluralName}_WithNanValue_DoNotThrowsArgumentException()
{{
- Assert.Throws(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.NaN));
+ var exception = Record.Exception(() => {_quantity.Name}.From{_baseUnit.PluralName}(double.NaN));
+
+ Assert.Null(exception);
}}
-"); Writer.WL($@"
[Fact]
public void As()
@@ -270,24 +363,193 @@ public void As()
AssertEx.EqualTolerance({unit.PluralName}InOne{_baseUnit.SingularName}, {baseUnitVariableName}.As({GetUnitFullName(unit)}), {unit.PluralName}Tolerance);");
Writer.WL($@"
}}
+");
+ if (_isDimensionless)
+ {
+ Writer.WL($@"
+
+ [Fact]
+ public void As_UnitSystem_ReturnsValueInDimensionlessUnit()
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_baseUnitFullName});
+
+ var convertedValue = quantity.As(UnitSystem.SI);
+
+ Assert.Equal(quantity.Value, convertedValue);
+ }}
[Fact]
- public void As_SIUnitSystem_ThrowsArgumentExceptionIfNotSupported()
+ public void As_UnitSystem_ThrowsArgumentNullExceptionIfNull()
{{
var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
- Func AsWithSIUnitSystem = () => quantity.As(UnitSystem.SI);
+ UnitSystem nullUnitSystem = null!;
+ Assert.Throws(() => quantity.As(nullUnitSystem));
+ }}
- if (SupportsSIUnitSystem)
+ [Fact]
+ public void ToUnitSystem_ReturnsValueInDimensionlessUnit()
+ {{
+ Assert.Multiple(() =>
{{
- var value = Convert.ToDouble(AsWithSIUnitSystem());
- Assert.Equal(1, value);
- }}
+ var quantity = new {_quantity.Name}(value: 1, unit: {_baseUnitFullName});
+
+ {_quantity.Name} convertedQuantity = quantity.ToUnit(UnitSystem.SI);
+
+ Assert.Equal({_baseUnitFullName}, convertedQuantity.Unit);
+ Assert.Equal(quantity.Value, convertedQuantity.Value);
+ }}, () =>
+ {{
+ IQuantity<{_unitEnumName}> quantity = new {_quantity.Name}(value: 1, unit: {_baseUnitFullName});
+
+ IQuantity<{_unitEnumName}> convertedQuantity = quantity.ToUnit(UnitSystem.SI);
+
+ Assert.Equal({_baseUnitFullName}, convertedQuantity.Unit);
+ Assert.Equal(quantity.Value, convertedQuantity.Value);
+ }}, () =>
+ {{
+ IQuantity quantity = new {_quantity.Name}(value: 1, unit: {_baseUnitFullName});
+
+ IQuantity convertedQuantity = quantity.ToUnit(UnitSystem.SI);
+
+ Assert.Equal({_baseUnitFullName}, convertedQuantity.Unit);
+ Assert.Equal(quantity.Value, convertedQuantity.Value);
+ }});
+ }}
+
+ [Fact]
+ public void ToUnit_UnitSystem_ThrowsArgumentNullExceptionIfNull()
+ {{
+ UnitSystem nullUnitSystem = null!;
+ Assert.Multiple(() =>
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }}, () =>
+ {{
+ IQuantity<{_unitEnumName}> quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }}, () =>
+ {{
+ IQuantity quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }});
+ }}
+");
+ }
else
+ {
+ Writer.WL($@"
+
+ [Fact]
+ public virtual void BaseUnit_HasSIBase()
+ {{
+ var baseUnitInfo = {_quantity.Name}.Info.BaseUnitInfo;
+ Assert.True(baseUnitInfo.BaseUnits.IsSubsetOf(UnitSystem.SI.BaseUnits));
+ }}
+
+ [Fact]
+ public virtual void As_UnitSystem_SI_ReturnsQuantityInSIUnits()
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ var expectedValue = quantity.As({_quantity.Name}.Info.GetDefaultUnit(UnitSystem.SI));
+
+ var convertedValue = quantity.As(UnitSystem.SI);
+
+ Assert.Equal(expectedValue, convertedValue);
+ }}
+
+ [Fact]
+ public void As_UnitSystem_ThrowsArgumentNullExceptionIfNull()
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ UnitSystem nullUnitSystem = null!;
+ Assert.Throws(() => quantity.As(nullUnitSystem));
+ }}
+
+ [Fact]
+ public void As_UnitSystem_ThrowsArgumentExceptionIfNotSupported()
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ var unsupportedUnitSystem = new UnitSystem(UnsupportedBaseUnits);
+ Assert.Throws(() => quantity.As(unsupportedUnitSystem));
+ }}
+
+ [Fact]
+ public virtual void ToUnit_UnitSystem_SI_ReturnsQuantityInSIUnits()
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ var expectedUnit = {_quantity.Name}.Info.GetDefaultUnit(UnitSystem.SI);
+ var expectedValue = quantity.As(expectedUnit);
+
+ Assert.Multiple(() =>
{{
- Assert.Throws(AsWithSIUnitSystem);
- }}
+ {_quantity.Name} quantityToConvert = quantity;
+
+ {_quantity.Name} convertedQuantity = quantityToConvert.ToUnit(UnitSystem.SI);
+
+ Assert.Equal(expectedUnit, convertedQuantity.Unit);
+ Assert.Equal(expectedValue, convertedQuantity.Value);
+ }}, () =>
+ {{
+ IQuantity<{_unitEnumName}> quantityToConvert = quantity;
+
+ IQuantity<{_unitEnumName}> convertedQuantity = quantityToConvert.ToUnit(UnitSystem.SI);
+
+ Assert.Equal(expectedUnit, convertedQuantity.Unit);
+ Assert.Equal(expectedValue, convertedQuantity.Value);
+ }}, () =>
+ {{
+ IQuantity quantityToConvert = quantity;
+
+ IQuantity convertedQuantity = quantityToConvert.ToUnit(UnitSystem.SI);
+
+ Assert.Equal(expectedUnit, convertedQuantity.Unit);
+ Assert.Equal(expectedValue, convertedQuantity.Value);
+ }});
+ }}
+
+ [Fact]
+ public void ToUnit_UnitSystem_ThrowsArgumentNullExceptionIfNull()
+ {{
+ UnitSystem nullUnitSystem = null!;
+ Assert.Multiple(() =>
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }}, () =>
+ {{
+ IQuantity<{_unitEnumName}> quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }}, () =>
+ {{
+ IQuantity quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(nullUnitSystem));
+ }});
}}
+ [Fact]
+ public void ToUnit_UnitSystem_ThrowsArgumentExceptionIfNotSupported()
+ {{
+ var unsupportedUnitSystem = new UnitSystem(UnsupportedBaseUnits);
+ Assert.Multiple(() =>
+ {{
+ var quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(unsupportedUnitSystem));
+ }}, () =>
+ {{
+ IQuantity<{_unitEnumName}> quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(unsupportedUnitSystem));
+ }}, () =>
+ {{
+ IQuantity quantity = new {_quantity.Name}(value: 1, unit: {_quantity.Name}.BaseUnit);
+ Assert.Throws(() => quantity.ToUnit(unsupportedUnitSystem));
+ }});
+ }}
+");
+ }
+
+ Writer.WL($@"
+
[Fact]
public void Parse()
{{");
@@ -327,45 +589,193 @@ public void TryParse()
}
Writer.WL($@"
}}
+");
- [Fact]
- public void ParseUnit()
- {{");
- foreach (var unit in _quantity.Units.Where(u => string.IsNullOrEmpty(u.ObsoleteText)))
- foreach (var localization in unit.Localization)
- foreach (var abbreviation in localization.Abbreviations)
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var abbreviation, Unit unit) in _uniqueAbbreviationsForCulture[FallbackCultureName])
{
Writer.WL($@"
- try
- {{
- var parsedUnit = {_quantity.Name}.ParseUnit(""{abbreviation}"", CultureInfo.GetCultureInfo(""{localization.Culture}""));
- Assert.Equal({GetUnitFullName(unit)}, parsedUnit);
- }} catch (AmbiguousUnitParseException) {{ /* Some units have the same abbreviations */ }}
+ [InlineData(""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ Writer.WL($@"
+ public void ParseUnit_WithUsEnglishCurrentCulture(string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ // Fallback culture ""{FallbackCultureName}"" is always localized
+ using var _ = new CultureScope(""{FallbackCultureName}"");
+ {_unitEnumName} parsedUnit = {_quantity.Name}.ParseUnit(abbreviation);
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
");
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var abbreviation, Unit unit) in _uniqueAbbreviationsForCulture[FallbackCultureName])
+ {
+ Writer.WL($@"
+ [InlineData(""{abbreviation}"", {GetUnitFullName(unit)})]");
}
Writer.WL($@"
+ public void ParseUnit_WithUnsupportedCurrentCulture_FallsBackToUsEnglish(string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ // Currently, no abbreviations are localized for Icelandic, so it should fall back to ""{FallbackCultureName}"" when parsing.
+ using var _ = new CultureScope(""is-IS"");
+ {_unitEnumName} parsedUnit = {_quantity.Name}.ParseUnit(abbreviation);
+ Assert.Equal(expectedUnit, parsedUnit);
}}
+");
- [Fact]
- public void TryParseUnit()
- {{");
- foreach (var unit in _quantity.Units.Where(u => string.IsNullOrEmpty(u.ObsoleteText)))
- foreach (var localization in unit.Localization)
- foreach (var abbreviation in localization.Abbreviations)
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var cultureName, Dictionary abbreviations) in _uniqueAbbreviationsForCulture)
{
- // Skip units with ambiguous abbreviations, since there is no exception to describe this is why TryParse failed.
- if (IsAmbiguousAbbreviation(localization, abbreviation)) continue;
+ foreach ((var abbreviation, Unit unit) in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ }
+ Writer.WL($@"
+ public void ParseUnit_WithCurrentCulture(string culture, string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ using var _ = new CultureScope(culture);
+ {_unitEnumName} parsedUnit = {_quantity.Name}.ParseUnit(abbreviation);
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
+");
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var cultureName, Dictionary abbreviations) in _uniqueAbbreviationsForCulture)
+ {
+ foreach ((var abbreviation, Unit unit) in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ }
+ Writer.WL($@"
+ public void ParseUnit_WithCulture(string culture, string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ {_unitEnumName} parsedUnit = {_quantity.Name}.ParseUnit(abbreviation, CultureInfo.GetCultureInfo(culture));
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
+");
+ // we only generate these for a few of the quantities
+ if (_ambiguousAbbreviationsForCulture.Count != 0)
+ {
Writer.WL($@"
- {{
- Assert.True({_quantity.Name}.TryParseUnit(""{abbreviation}"", CultureInfo.GetCultureInfo(""{localization.Culture}""), out var parsedUnit));
- Assert.Equal({GetUnitFullName(unit)}, parsedUnit);
- }}
+ [Theory]");
+ foreach ((var cultureName, Dictionary>? abbreviations) in _ambiguousAbbreviationsForCulture)
+ {
+ foreach (KeyValuePair> ambiguousPair in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{ambiguousPair.Key}"")] // [{string.Join(", ", ambiguousPair.Value.Select(x => x.SingularName))}] ");
+ }
+ }
+ Writer.WL($@"
+ public void ParseUnitWithAmbiguousAbbreviation(string culture, string abbreviation)
+ {{
+ Assert.Throws(() => {_quantity.Name}.ParseUnit(abbreviation, CultureInfo.GetCultureInfo(culture)));
+ }}
");
+ } // ambiguousAbbreviations
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var abbreviation, Unit unit) in _uniqueAbbreviationsForCulture[FallbackCultureName])
+ {
+ Writer.WL($@"
+ [InlineData(""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ Writer.WL($@"
+ public void TryParseUnit_WithUsEnglishCurrentCulture(string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ // Fallback culture ""{FallbackCultureName}"" is always localized
+ using var _ = new CultureScope(""{FallbackCultureName}"");
+ Assert.True({_quantity.Name}.TryParseUnit(abbreviation, out {_unitEnumName} parsedUnit));
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
+");
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var abbreviation, Unit unit) in _uniqueAbbreviationsForCulture[FallbackCultureName])
+ {
+ Writer.WL($@"
+ [InlineData(""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ Writer.WL($@"
+ public void TryParseUnit_WithUnsupportedCurrentCulture_FallsBackToUsEnglish(string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ // Currently, no abbreviations are localized for Icelandic, so it should fall back to ""{FallbackCultureName}"" when parsing.
+ using var _ = new CultureScope(""is-IS"");
+ Assert.True({_quantity.Name}.TryParseUnit(abbreviation, out {_unitEnumName} parsedUnit));
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
+");
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var cultureName, Dictionary abbreviations) in _uniqueAbbreviationsForCulture)
+ {
+ foreach ((var abbreviation, Unit unit) in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
+ }
+ Writer.WL($@"
+ public void TryParseUnit_WithCurrentCulture(string culture, string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ using var _ = new CultureScope(culture);
+ Assert.True({_quantity.Name}.TryParseUnit(abbreviation, out {_unitEnumName} parsedUnit));
+ Assert.Equal(expectedUnit, parsedUnit);
+ }}
+");
+
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var cultureName, Dictionary abbreviations) in _uniqueAbbreviationsForCulture)
+ {
+ foreach ((var abbreviation, Unit unit) in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{abbreviation}"", {GetUnitFullName(unit)})]");
+ }
}
Writer.WL($@"
+ public void TryParseUnit_WithCulture(string culture, string abbreviation, {_unitEnumName} expectedUnit)
+ {{
+ Assert.True({_quantity.Name}.TryParseUnit(abbreviation, CultureInfo.GetCultureInfo(culture), out {_unitEnumName} parsedUnit));
+ Assert.Equal(expectedUnit, parsedUnit);
}}
+");
+ // we only generate these for a few of the quantities
+ if (_ambiguousAbbreviationsForCulture.Count != 0)
+ {
+ Writer.WL($@"
+ [Theory]");
+ foreach ((var cultureName, Dictionary>? abbreviations) in _ambiguousAbbreviationsForCulture)
+ {
+ foreach (KeyValuePair> ambiguousPair in abbreviations)
+ {
+ Writer.WL($@"
+ [InlineData(""{cultureName}"", ""{ambiguousPair.Key}"")] // [{string.Join(", ", ambiguousPair.Value.Select(x => x.SingularName))}] ");
+ }
+ }
+ Writer.WL($@"
+ public void TryParseUnitWithAmbiguousAbbreviation(string culture, string abbreviation)
+ {{
+ Assert.False({_quantity.Name}.TryParseUnit(abbreviation, CultureInfo.GetCultureInfo(culture), out _));
+ }}
+");
+ } // ambiguousAbbreviations
+
+ Writer.WL($@"
[Theory]
[MemberData(nameof(UnitTypes))]
public void ToUnit({_unitEnumName} unit)
@@ -387,16 +797,16 @@ public void ToUnit_WithSameUnits_AreEqual({_unitEnumName} unit)
Assert.Equal(quantity, toUnitWithSameUnit);
}}
- [Theory{(_quantity.Units.Length == 1 ? "(Skip = \"Multiple units required\")" : string.Empty)}]
+ [Theory]
[MemberData(nameof(UnitTypes))]
public void ToUnit_FromNonBaseUnit_ReturnsQuantityWithGivenUnit({_unitEnumName} unit)
{{
- // See if there is a unit available that is not the base unit, fallback to base unit if it has only a single unit.
- var fromUnit = {_quantity.Name}.Units.First(u => u != {_quantity.Name}.BaseUnit);
-
- var quantity = {_quantity.Name}.From(3.0, fromUnit);
- var converted = quantity.ToUnit(unit);
- Assert.Equal(converted.Unit, unit);
+ Assert.All({_quantity.Name}.Units.Where(u => u != {_quantity.Name}.BaseUnit), fromUnit =>
+ {{
+ var quantity = {_quantity.Name}.From(3.0, fromUnit);
+ var converted = quantity.ToUnit(unit);
+ Assert.Equal(converted.Unit, unit);
+ }});
}}
[Theory]
@@ -408,6 +818,25 @@ public virtual void ToUnit_FromDefaultQuantity_ReturnsQuantityWithGivenUnit({_un
Assert.Equal(converted.Unit, unit);
}}
+ [Theory]
+ [MemberData(nameof(UnitTypes))]
+ public void ToUnit_FromIQuantity_ReturnsTheExpectedIQuantity({_unitEnumName} unit)
+ {{
+ var quantity = {_quantity.Name}.From(3, {_quantity.Name}.BaseUnit);
+ {_quantity.Name} expectedQuantity = quantity.ToUnit(unit);
+ Assert.Multiple(() =>
+ {{
+ IQuantity<{_unitEnumName}> quantityToConvert = quantity;
+ IQuantity<{_unitEnumName}> convertedQuantity = quantityToConvert.ToUnit(unit);
+ Assert.Equal(unit, convertedQuantity.Unit);
+ }}, () =>
+ {{
+ IQuantity quantityToConvert = quantity;
+ IQuantity convertedQuantity = quantityToConvert.ToUnit(unit);
+ Assert.Equal(unit, convertedQuantity.Unit);
+ }});
+ }}
+
[Fact]
public void ConversionRoundTrip()
{{
@@ -512,7 +941,7 @@ public void CompareToThrowsOnNull()
[InlineData(1, {_baseUnitFullName}, 1, {_otherOrBaseUnitFullName}, false)] // Different unit.");
}
Writer.WL($@"
- public void Equals_ReturnsTrue_IfValueAndUnitAreEqual({_quantity.ValueType} valueA, {_unitEnumName} unitA, {_quantity.ValueType} valueB, {_unitEnumName} unitB, bool expectEqual)
+ public void Equals_ReturnsTrue_IfValueAndUnitAreEqual(double valueA, {_unitEnumName} unitA, double valueB, {_unitEnumName} unitB, bool expectEqual)
{{
var a = new {_quantity.Name}(valueA, unitA);
var b = new {_quantity.Name}(valueB, unitB);
@@ -554,8 +983,8 @@ public void Equals_RelativeTolerance_IsImplemented()
var v = {_quantity.Name}.From{_baseUnit.PluralName}(1);
Assert.True(v.Equals({_quantity.Name}.From{_baseUnit.PluralName}(1), {_baseUnit.PluralName}Tolerance, ComparisonType.Relative));
Assert.False(v.Equals({_quantity.Name}.Zero, {_baseUnit.PluralName}Tolerance, ComparisonType.Relative));
- Assert.True({_quantity.Name}.From{_baseUnit.PluralName}(100).Equals({_quantity.Name}.From{_baseUnit.PluralName}(120), ({_quantity.ValueType})0.3m, ComparisonType.Relative));
- Assert.False({_quantity.Name}.From{_baseUnit.PluralName}(100).Equals({_quantity.Name}.From{_baseUnit.PluralName}(120), ({_quantity.ValueType})0.1m, ComparisonType.Relative));
+ Assert.True({_quantity.Name}.From{_baseUnit.PluralName}(100).Equals({_quantity.Name}.From{_baseUnit.PluralName}(120), 0.3, ComparisonType.Relative));
+ Assert.False({_quantity.Name}.From{_baseUnit.PluralName}(100).Equals({_quantity.Name}.From{_baseUnit.PluralName}(120), 0.1, ComparisonType.Relative));
}}
[Fact]
@@ -625,20 +1054,20 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture
public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture()
{{
var _ = new CultureScope(CultureInfo.InvariantCulture);
- Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s1""));
- Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s2""));
- Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3""));
- Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4""));
+ Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s1""));
+ Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s2""));
+ Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s3""));
+ Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s4""));
}}
[Fact]
public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture()
{{
var culture = CultureInfo.InvariantCulture;
- Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s1"", culture));
- Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s2"", culture));
- Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s3"", culture));
- Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456{_numberSuffix}, {_baseUnitFullName}).ToString(""s4"", culture));
+ Assert.Equal(""0.1{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s1"", culture));
+ Assert.Equal(""0.12{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s2"", culture));
+ Assert.Equal(""0.123{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s3"", culture));
+ Assert.Equal(""0.1235{_baseUnitEnglishAbbreviation}"", new {_quantity.Name}(0.123456, {_baseUnitFullName}).ToString(""s4"", culture));
}}
[Theory]
@@ -651,7 +1080,7 @@ public void ToString_NullFormat_DefaultsToGeneralFormat(string cultureName)
? null
: CultureInfo.GetCultureInfo(cultureName);
- Assert.Equal(quantity.ToString(""g"", formatProvider), quantity.ToString(null, formatProvider));
+ Assert.Equal(quantity.ToString(""G"", formatProvider), quantity.ToString(null, formatProvider));
}}
[Theory]
@@ -803,6 +1232,13 @@ public void Convert_ChangeType_InvalidType_ThrowsInvalidCastException()
Assert.Throws(() => Convert.ChangeType(quantity, typeof(QuantityFormatter)));
}}
+ [Fact]
+ public void Convert_GetTypeCode_Returns_Object()
+ {{
+ var quantity = {_quantity.Name}.From{_baseUnit.PluralName}(1.0);
+ Assert.Equal(TypeCode.Object, Convert.GetTypeCode(quantity));
+ }}
+
[Fact]
public void GetHashCode_Equals()
{{
diff --git a/CodeGen/Generators/UnitsNetGenerator.cs b/CodeGen/Generators/UnitsNetGenerator.cs
index ca23308212..907f70e4a6 100644
--- a/CodeGen/Generators/UnitsNetGenerator.cs
+++ b/CodeGen/Generators/UnitsNetGenerator.cs
@@ -153,6 +153,9 @@ private static void GenerateResourceFiles(Quantity[] quantities, string resource
$"{resourcesDirectory}/{quantity.Name}.restext" :
$"{resourcesDirectory}/{quantity.Name}.{culture}.restext";
+ // Ensure parent folder exists
+ Directory.CreateDirectory(resourcesDirectory);
+
using var writer = File.CreateText(fileName);
foreach(Unit unit in quantity.Units)
diff --git a/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefix.cs b/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefix.cs
new file mode 100644
index 0000000000..c73ee0106b
--- /dev/null
+++ b/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefix.cs
@@ -0,0 +1,18 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using CodeGen.JsonTypes;
+
+namespace CodeGen.Helpers.PrefixBuilder;
+
+///
+/// Represents a unique combination of a base unit and an optional prefix, used to identify a prefixed unit.
+///
+///
+/// The base unit associated with the prefix, such as "Gram".
+///
+///
+/// The prefix applied to the base unit, such as .
+/// If the prefix exponent value is 0, this parameter will be null .
+///
+internal readonly record struct BaseUnitPrefix(string BaseUnit, Prefix? Prefix);
diff --git a/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefixes.cs b/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefixes.cs
new file mode 100644
index 0000000000..2822de4fc0
--- /dev/null
+++ b/CodeGen/Helpers/PrefixBuilder/BaseUnitPrefixes.cs
@@ -0,0 +1,176 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using CodeGen.JsonTypes;
+
+namespace CodeGen.Helpers.PrefixBuilder;
+
+///
+/// Represents a collection of base unit prefixes and their associated mappings.
+///
+///
+/// This class provides functionality to manage and retrieve mappings between base units and their prefixed
+/// counterparts,
+/// including scale factors and prefixed unit names. It supports operations such as creating mappings from a collection
+/// of base units and finding matching prefixes for specific units.
+///
+internal class BaseUnitPrefixes
+{
+ ///
+ /// A dictionary that maps metric prefixes to their corresponding exponent values.
+ ///
+ ///
+ /// This dictionary excludes binary prefixes such as Kibi, Mebi, Gibi, Tebi, Pebi, and Exbi.
+ ///
+ private static readonly Dictionary MetricPrefixFactors = PrefixInfo.Entries.Where(x => x.Key.IsMetricPrefix())
+ .ToDictionary(pair => pair.Key, pair => pair.Value.GetDecimalExponent());
+
+ ///
+ /// A dictionary that maps the exponent values to their corresponding .
+ /// This is used to find the appropriate prefix for a given factor.
+ ///
+ private static readonly Dictionary PrefixFactorsByValue = MetricPrefixFactors.ToDictionary(pair => pair.Value, pair => pair.Key);
+
+ ///
+ /// Lookup of prefixed unit name from base unit + prefix pairs, such as ("Gram", Prefix.Kilo) => "Kilogram".
+ ///
+ private readonly Dictionary _baseUnitPrefixConversions;
+
+ ///
+ /// A dictionary that maps prefixed unit strings to their corresponding base unit and fractional factor.
+ ///
+ ///
+ /// This dictionary is used to handle units with SI prefixes, allowing for the conversion of prefixed units
+ /// to their base units and the associated fractional factors. The keys are the prefixed unit strings, and the values
+ /// are tuples containing the base unit string and the fractional factor.
+ ///
+ private readonly Dictionary _prefixedStringFactors;
+
+ private BaseUnitPrefixes(Dictionary prefixedStringFactors, Dictionary baseUnitPrefixConversions)
+ {
+ _prefixedStringFactors = prefixedStringFactors;
+ _baseUnitPrefixConversions = baseUnitPrefixConversions;
+ }
+
+ ///
+ /// Creates an instance of from a collection of base units.
+ ///
+ ///
+ /// A collection of base units, each containing a singular name and associated prefixes.
+ ///
+ ///
+ /// A new instance of containing mappings of base units
+ /// and their prefixed counterparts.
+ ///
+ ///
+ /// This method processes the provided base units to generate mappings between base unit prefixes
+ /// and their corresponding prefixed unit names, as well as scale factors for each prefixed unit.
+ ///
+ public static BaseUnitPrefixes FromBaseUnits(IEnumerable baseUnits)
+ {
+ var baseUnitPrefixConversions = new Dictionary();
+ var prefixedStringFactors = new Dictionary();
+ foreach (Unit baseUnit in baseUnits)
+ {
+ var unitName = baseUnit.SingularName;
+ prefixedStringFactors[unitName] = new PrefixScaleFactor(unitName, 0);
+ baseUnitPrefixConversions[new BaseUnitPrefix(unitName, null)] = unitName;
+ foreach (Prefix prefix in baseUnit.Prefixes)
+ {
+ var prefixedUnitName = prefix + unitName.ToCamelCase();
+ baseUnitPrefixConversions[new BaseUnitPrefix(unitName, prefix)] = prefixedUnitName;
+ prefixedStringFactors[prefixedUnitName] = new PrefixScaleFactor(unitName, MetricPrefixFactors[prefix]);
+ }
+ }
+
+ return new BaseUnitPrefixes(prefixedStringFactors, baseUnitPrefixConversions);
+ }
+
+ ///
+ /// Attempts to find a matching prefix for a given unit name, exponent, and prefix.
+ ///
+ ///
+ /// The name of the unit to match. For example, "Meter".
+ ///
+ ///
+ /// The exponent associated with the unit. For example, 3 for cubic meters.
+ ///
+ ///
+ /// The prefix to match. For example, .
+ ///
+ ///
+ /// When this method returns, contains the matching if a match is found;
+ /// otherwise, the default value of .
+ ///
+ ///
+ /// if a matching prefix is found; otherwise, .
+ ///
+ ///
+ /// This method determines if a given unit can be associated with a specific prefix, given the exponent of the
+ /// associated dimension.
+ ///
+ internal bool TryGetMatchingPrefix(string unitName, int exponent, Prefix prefix, out BaseUnitPrefix matchingPrefix)
+ {
+ if (exponent == 0 || !_prefixedStringFactors.TryGetValue(unitName, out PrefixScaleFactor? targetPrefixFactor))
+ {
+ matchingPrefix = default;
+ return false;
+ }
+
+ if (MetricPrefixFactors.TryGetValue(prefix, out var prefixFactor))
+ {
+ var (quotient, remainder) = int.DivRem(prefixFactor, exponent);
+ // Ensure the prefix factor is divisible by the exponent without a remainder and that there is a valid prefix matching the target scale
+ if (remainder == 0)
+ {
+ if (targetPrefixFactor.ScaleFactor + quotient == 0)
+ {
+ // when the resulting exponent is 0: return the non-prefixed BaseUnit
+ matchingPrefix = new BaseUnitPrefix(targetPrefixFactor.BaseUnit, null);
+ return true;
+ }
+
+ if (TryGetPrefixWithScale(targetPrefixFactor.ScaleFactor + quotient, out Prefix calculatedPrefix))
+ {
+ matchingPrefix = new BaseUnitPrefix(targetPrefixFactor.BaseUnit, calculatedPrefix);
+ return true;
+ }
+ }
+ }
+
+ matchingPrefix = default;
+ return false;
+ }
+
+ private static bool TryGetPrefixWithScale(int logScale, out Prefix calculatedPrefix)
+ {
+ return PrefixFactorsByValue.TryGetValue(logScale, out calculatedPrefix);
+ }
+
+ ///
+ /// Attempts to retrieve the prefixed unit name for a given base unit and prefix combination.
+ ///
+ ///
+ /// A representing the combination of a base unit and a prefix.
+ ///
+ ///
+ /// When this method returns, contains the prefixed unit name if the lookup was successful; otherwise, null .
+ ///
+ ///
+ /// true if the prefixed unit name was successfully retrieved; otherwise, false .
+ ///
+ internal bool TryGetPrefixForUnit(BaseUnitPrefix prefix, [NotNullWhen(true)] out string? prefixedUnitName)
+ {
+ return _baseUnitPrefixConversions.TryGetValue(prefix, out prefixedUnitName);
+ }
+
+ ///
+ /// Represents the scaling factor that is required for converting from the .
+ ///
+ /// Name of base unit, e.g. "Meter".
+ /// The log-scale factor, e.g. 3 for kilometer.
+ private record PrefixScaleFactor(string BaseUnit, int ScaleFactor);
+}
diff --git a/CodeGen/Helpers/PrefixBuilder/PrefixBuilderExtensions.cs b/CodeGen/Helpers/PrefixBuilder/PrefixBuilderExtensions.cs
new file mode 100644
index 0000000000..a39c526ffa
--- /dev/null
+++ b/CodeGen/Helpers/PrefixBuilder/PrefixBuilderExtensions.cs
@@ -0,0 +1,105 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using CodeGen.JsonTypes;
+
+namespace CodeGen.Helpers.PrefixBuilder;
+
+///
+/// Provides extension methods for working with , ,
+/// and types, enabling operations such as determining metric prefixes,
+/// calculating decimal exponents, and retrieving non-zero exponents from base dimensions.
+///
+///
+/// This static class contains utility methods designed to simplify and enhance the manipulation
+/// of prefix-related data and base dimensions in the context of code generation.
+///
+internal static class PrefixBuilderExtensions
+{
+ ///
+ /// Determines whether the specified is a metric prefix.
+ ///
+ /// The to evaluate.
+ ///
+ /// true if the is a metric prefix (ranging from to
+ /// );
+ /// otherwise, false .
+ ///
+ internal static bool IsMetricPrefix(this Prefix prefix)
+ {
+ return prefix is >= Prefix.Yocto and <= Prefix.Yotta;
+ }
+
+ ///
+ /// Calculates the decimal exponent of a metric prefix factor.
+ ///
+ ///
+ /// The instance representing the metric prefix whose decimal exponent is to be calculated.
+ ///
+ ///
+ /// The decimal exponent as an integer, derived from the logarithm base 10 of the prefix factor.
+ ///
+ ///
+ /// This method assumes that the factor is a valid numeric string representing a power of ten.
+ ///
+ internal static int GetDecimalExponent(this PrefixInfo prefix)
+ {
+ return (int)Math.Log10(double.Parse(prefix.Factor.TrimEnd('d'), NumberStyles.Any, CultureInfo.InvariantCulture));
+ }
+
+ ///
+ /// Retrieves all non-zero exponents from the specified instance.
+ ///
+ ///
+ /// The instance containing the exponents to evaluate.
+ ///
+ ///
+ /// An of integers representing the non-zero exponents in the specified dimensions.
+ ///
+ ///
+ /// This method iterates through the properties of the instance and yields
+ /// only those exponents that are non-zero. The properties correspond to the base physical dimensions
+ /// such as time (T), length (L), mass (M), electric current (I), absolute temperature (Θ),
+ /// amount of substance (N), and luminous intensity (J).
+ ///
+ internal static IEnumerable GetNonZeroExponents(this BaseDimensions dimensions)
+ {
+ if (dimensions.I != 0)
+ {
+ yield return dimensions.I;
+ }
+
+ if (dimensions.J != 0)
+ {
+ yield return dimensions.J;
+ }
+
+ if (dimensions.L != 0)
+ {
+ yield return dimensions.L;
+ }
+
+ if (dimensions.M != 0)
+ {
+ yield return dimensions.M;
+ }
+
+ if (dimensions.N != 0)
+ {
+ yield return dimensions.N;
+ }
+
+ if (dimensions.T != 0)
+ {
+ yield return dimensions.T;
+ }
+
+ if (dimensions.Θ != 0)
+ {
+ yield return dimensions.Θ;
+ }
+ }
+}
diff --git a/CodeGen/Helpers/PrefixBuilder/UnitPrefixBuilder.cs b/CodeGen/Helpers/PrefixBuilder/UnitPrefixBuilder.cs
new file mode 100644
index 0000000000..7ef1a63139
--- /dev/null
+++ b/CodeGen/Helpers/PrefixBuilder/UnitPrefixBuilder.cs
@@ -0,0 +1,334 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using CodeGen.JsonTypes;
+
+namespace CodeGen.Helpers.PrefixBuilder;
+
+///
+/// Provides functionality for building the prefixed units of a .
+///
+///
+/// This class is responsible for generating prefixed units by applying defined prefixes to existing units.
+/// It utilizes the to handle prefix configurations and conversions.
+///
+internal class UnitPrefixBuilder
+{
+ private readonly BaseUnitPrefixes _prefixes;
+
+ ///
+ /// Initializes a new instance of the class with the specified base unit prefixes.
+ ///
+ ///
+ /// The instance containing the base unit prefixes to be used.
+ /// This parameter must not be null .
+ ///
+ public UnitPrefixBuilder(BaseUnitPrefixes prefixes)
+ {
+ _prefixes = prefixes;
+ }
+
+ ///
+ /// Generates a list of prefixed units for the specified by applying all defined prefixes
+ /// to its existing units.
+ ///
+ ///
+ /// The for which prefixed units will be generated. This parameter must not be null .
+ ///
+ ///
+ /// A list of newly created objects that represent the prefixed units.
+ ///
+ ///
+ /// Thrown when an error occurs while processing a prefix for a unit, such as an invalid prefix or unit configuration.
+ ///
+ ///
+ /// This method iterates through the existing units of the specified and applies each defined
+ /// prefix to generate new prefixed units. It ensures that the singular and plural names, conversion functions,
+ /// localization, and other properties are appropriately updated for the newly created units.
+ ///
+ public List GeneratePrefixUnits(Quantity quantity)
+ {
+ var unitsToAdd = new List();
+ foreach (Unit unit in quantity.Units)
+ foreach (Prefix prefix in unit.Prefixes)
+ {
+ try
+ {
+ PrefixInfo prefixInfo = PrefixInfo.Entries[prefix];
+
+ unitsToAdd.Add(new Unit
+ {
+ SingularName = $"{prefix}{unit.SingularName.ToCamelCase()}", // "Kilo" + "NewtonPerMeter" => "KilonewtonPerMeter"
+ PluralName = $"{prefix}{unit.PluralName.ToCamelCase()}", // "Kilo" + "NewtonsPerMeter" => "KilonewtonsPerMeter"
+ BaseUnits = GetPrefixedBaseUnits(quantity.BaseDimensions, unit.BaseUnits, prefixInfo),
+ FromBaseToUnitFunc = $"({unit.FromBaseToUnitFunc}) / {prefixInfo.Factor}",
+ FromUnitToBaseFunc = $"({unit.FromUnitToBaseFunc}) * {prefixInfo.Factor}",
+ Localization = GetLocalizationForPrefixUnit(unit.Localization, prefixInfo),
+ ObsoleteText = unit.ObsoleteText,
+ SkipConversionGeneration = unit.SkipConversionGeneration,
+ AllowAbbreviationLookup = unit.AllowAbbreviationLookup
+ });
+ }
+ catch (Exception e)
+ {
+ throw new Exception($"Error parsing prefix {prefix} for unit {quantity.Name}.{unit.SingularName}.", e);
+ }
+ }
+
+ return unitsToAdd;
+ }
+
+ ///
+ /// Applies a metric prefix to the specified base units based on the given dimensions and prefix information.
+ ///
+ ///
+ /// The SI base unit dimensions of the quantity, such as L=1 for Length or T=-1 for Speed.
+ ///
+ ///
+ /// The SI base units for a non-prefixed unit, for example, L=Meter for Length.Meter or L=Meter, T=Second for
+ /// Speed.MeterPerSecond.
+ ///
+ ///
+ /// The information about the metric prefix to apply, including its factor and symbol.
+ ///
+ ///
+ /// A new instance of with the metric prefix applied, or null if no matching
+ /// prefixed base units could be determined.
+ /// Note that even if is not null , the result may still be null if no valid
+ /// prefixed base units are found.
+ ///
+ ///
+ /// The algorithm attempts to find matching prefixed base units by iterating through the non-zero dimension exponents
+ /// of the provided . The exponents are processed in ascending order of their absolute
+ /// values, with positive exponents being prioritized over negative ones. This approach improves the likelihood of
+ /// finding a
+ /// match that does not deviate too much from the desired prefix.
+ ///
+ ///
+ /// Examples of determining base units of prefix units:
+ ///
+ /// -
+ ///
Example 1 - Pressure.Micropascal
+ ///
+ ///
+ /// This highlights how UnitsNet chose Gram as the conversion base unit, while SI defines Kilogram as
+ /// the base mass unit.
+ ///
+ ///
+ /// Requested prefix: Micro (scale -6) for pressure unit Pascal
+ /// SI base units of Pascal: L=Meter, M=Kilogram, T=Second
+ /// SI base dimensions, ordered: M=1, L=-1, T=-2
+ /// Trying first dimension M=1:
+ /// SI base mass unit is Kilogram, but UnitsNet base mass unit is Gram so base prefix scale is 3
+ /// Inferred prefix is Milli: base prefix scale 3 + requested prefix scale (-6) = -3
+ /// ✅ Resulting base units: M=Milligram plus the original L=Meter, T=Second
+ ///
+ ///
+ ///
+ /// -
+ ///
Example 2 - Pressure.Millipascal
+ ///
+ ///
+ /// Similar to example 1, but this time Length is used instead of Mass due to the base unit scale
+ /// factor of mass canceling out the requested prefix.
+ ///
+ ///
+ /// Requested prefix: Milli (scale -3) for pressure unit Pascal
+ /// SI base units of Pascal: L=Meter, M=Kilogram, T=Second
+ /// SI base dimensions, ordered: M=1, L=-1, T=-2
+ /// Trying first dimension M=1:
+ /// SI base unit in mass dimension is Kilogram, but configured base unit is Gram so base prefix scale is 3
+ /// ❌ No inferred prefix: base prefix scale 3 + requested prefix scale (-3) = 0
+ /// Trying second dimension L=-1:
+ /// SI base unit in length dimension is Meter, same as configured base unit, so base prefix scale is 0
+ /// Inferred prefix is Milli: base prefix scale 0 + requested prefix scale (-3) = -3
+ /// ✅ Resulting base units: M=Millimeter plus the original M=Kilogram, T=Second
+ ///
+ ///
+ ///
+ /// -
+ ///
Example 3 - ElectricApparentPower.Kilovoltampere
+ ///
+ ///
+ /// This example demonstrates cases where determining the base units for certain prefixes is not
+ /// possible or trivial.
+ ///
+ ///
+ /// Requested prefix: Kilo (scale 3) for unit Voltampere
+ /// SI base units of Voltampere: L=Meter, M=Kilogram, T=Second
+ /// SI base dimensions, ordered: M=1, L=2, T=-3
+ /// Trying first dimension M=1:
+ /// SI base unit in mass dimension is Kilogram, same as configured base unit, so base prefix scale is 0
+ /// Inferred prefix is Kilo: base prefix scale 0 + requested prefix scale (3) = 3
+ /// ❌ Kilo prefix for Kilogram unit would be Megagram, but there is no unit Megagram, since Gram does not have this prefix (we could add it)
+ /// Trying second dimension L=2:
+ /// ❌ There is no metric prefix we can raise to the power of 2 and get Kilo, e.g., Deca*Deca = Hecto, Kilo*Kilo = Mega, etc.
+ /// Trying third dimension T=-3:
+ /// SI base unit in time dimension is Second, same as configured base unit, so base prefix scale is 0
+ /// Inferred prefix is Deci: (base prefix scale 0 + requested prefix scale (-3)) / exponent -3 = -3 / -3 = 1
+ /// ❌ There is no Duration unit Decasecond (we could add it)
+ ///
+ ///
+ ///
+ ///
+ ///
+ private BaseUnits? GetPrefixedBaseUnits(BaseDimensions dimensions, BaseUnits? baseUnits, PrefixInfo prefixInfo)
+ {
+ if (baseUnits is null) return null;
+
+ // Iterate the non-zero dimension exponents in absolute-increasing order, positive first [1, -1, 2, -2...n, -n]
+ foreach (var degree in dimensions.GetNonZeroExponents().OrderBy(int.Abs).ThenByDescending(x => x))
+ {
+ if (TryPrefixWithExponent(dimensions, baseUnits, prefixInfo.Prefix, degree, out BaseUnits? prefixedUnits))
+ {
+ return prefixedUnits;
+ }
+ }
+
+ return null;
+ }
+
+ ///
+ /// Attempts to apply a specified prefix to a base unit based on a given exponent.
+ ///
+ ///
+ /// The base dimensions containing the exponents for each dimension (e.g., length, mass, time).
+ ///
+ ///
+ /// The base units to which the prefix will be applied.
+ ///
+ ///
+ /// The prefix to be applied (e.g., Kilo, Milli, Micro).
+ ///
+ ///
+ /// The exponent of the dimension to which the prefix should be applied.
+ ///
+ ///
+ /// When this method returns, contains the prefixed base units if the operation was successful; otherwise, null .
+ ///
+ ///
+ /// true if the prefix was successfully applied to the base unit; otherwise, false .
+ ///
+ private bool TryPrefixWithExponent(BaseDimensions dimensions, BaseUnits baseUnits, Prefix prefix, int exponent,
+ [NotNullWhen(true)] out BaseUnits? prefixedBaseUnits)
+ {
+ prefixedBaseUnits = baseUnits.Clone();
+
+ // look for a dimension that is part of the non-zero exponents
+ if (baseUnits.N is { } baseAmountUnit && dimensions.N == exponent)
+ {
+ if (TryPrefixUnit(baseAmountUnit, exponent, prefix, out var newAmount))
+ {
+ prefixedBaseUnits.N = newAmount;
+ return true;
+ }
+ }
+
+ if (baseUnits.I is { } baseCurrentUnit && dimensions.I == exponent)
+ {
+ if (TryPrefixUnit(baseCurrentUnit, exponent, prefix, out var newCurrent))
+ {
+ prefixedBaseUnits.I = newCurrent;
+ return true;
+ }
+ }
+
+ if (baseUnits.L is { } baseLengthUnit && dimensions.L == exponent)
+ {
+ if (TryPrefixUnit(baseLengthUnit, exponent, prefix, out var newLength))
+ {
+ prefixedBaseUnits.L = newLength;
+ return true;
+ }
+ }
+
+ if (baseUnits.J is { } baseLuminosityUnit && dimensions.J == exponent)
+ {
+ if (TryPrefixUnit(baseLuminosityUnit, exponent, prefix, out var newLuminosity))
+ {
+ prefixedBaseUnits.J = newLuminosity;
+ return true;
+ }
+ }
+
+ if (baseUnits.M is { } baseMassUnit && dimensions.M == exponent)
+ {
+ if (TryPrefixUnit(baseMassUnit, exponent, prefix, out var newMass))
+ {
+ prefixedBaseUnits.M = newMass;
+ return true;
+ }
+ }
+
+ if (baseUnits.Θ is { } baseTemperatureUnit && dimensions.Θ == exponent)
+ {
+ if (TryPrefixUnit(baseTemperatureUnit, exponent, prefix, out var newTemperature))
+ {
+ prefixedBaseUnits.Θ = newTemperature;
+ return true;
+ }
+ }
+
+ if (baseUnits.T is { } baseDurationUnit && dimensions.T == exponent)
+ {
+ if (TryPrefixUnit(baseDurationUnit, exponent, prefix, out var newTime))
+ {
+ prefixedBaseUnits.T = newTime;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// Attempts to apply a specified prefix to a unit name based on the given exponent and prefix.
+ ///
+ /// The name of the unit to which the prefix should be applied.
+ /// The exponent associated with the unit, used to determine compatibility with the prefix.
+ /// The to be applied to the unit.
+ ///
+ /// When this method returns, contains the prefixed unit name if the operation was successful; otherwise, null .
+ ///
+ ///
+ /// true if a matching prefix was found; otherwise, false .
+ ///
+ private bool TryPrefixUnit(string unitName, int exponent, Prefix prefix, [NotNullWhen(true)] out string? prefixedUnitName)
+ {
+ if (_prefixes.TryGetMatchingPrefix(unitName, exponent, prefix, out BaseUnitPrefix unitPrefix) &&
+ _prefixes.TryGetPrefixForUnit(unitPrefix, out prefixedUnitName))
+ {
+ return true;
+ }
+
+ prefixedUnitName = null;
+ return false;
+ }
+
+ ///
+ /// Create unit abbreviations for a prefix unit, given a unit and the prefix.
+ /// The unit abbreviations are either prefixed with the SI prefix or an explicitly configured abbreviation via
+ /// .
+ ///
+ private static Localization[] GetLocalizationForPrefixUnit(IEnumerable localizations, PrefixInfo prefixInfo)
+ {
+ return localizations.Select(loc =>
+ {
+ if (loc.TryGetAbbreviationsForPrefix(prefixInfo.Prefix, out var unitAbbreviationsForPrefix))
+ {
+ return new Localization { Culture = loc.Culture, Abbreviations = unitAbbreviationsForPrefix };
+ }
+
+ // No prefix unit abbreviations are specified, so fall back to prepending the default SI prefix to each unit abbreviation:
+ // kilo ("k") + meter ("m") => kilometer ("km")
+ var prefix = prefixInfo.GetPrefixForCultureOrSiPrefix(loc.Culture);
+ unitAbbreviationsForPrefix = loc.Abbreviations.Select(unitAbbreviation => $"{prefix}{unitAbbreviation}").ToArray();
+
+ return new Localization { Culture = loc.Culture, Abbreviations = unitAbbreviationsForPrefix };
+ }).ToArray();
+ }
+}
diff --git a/CodeGen/JsonTypes/BaseDimensions.cs b/CodeGen/JsonTypes/BaseDimensions.cs
index a6caad21fd..59f9389505 100644
--- a/CodeGen/JsonTypes/BaseDimensions.cs
+++ b/CodeGen/JsonTypes/BaseDimensions.cs
@@ -1,6 +1,8 @@
-// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+using System.Text;
+
namespace CodeGen.JsonTypes
{
internal class BaseDimensions
@@ -25,5 +27,39 @@ internal class BaseDimensions
// 0649 Field is never assigned to
#pragma warning restore 0649
+
+
+ ///
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+
+ // There are many possible choices of base physical dimensions. The SI standard selects the following dimensions and corresponding dimension symbols:
+ // time (T), length (L), mass (M), electric current (I), absolute temperature (Θ), amount of substance (N) and luminous intensity (J).
+ AppendDimensionString(sb, "T", T);
+ AppendDimensionString(sb, "L", L);
+ AppendDimensionString(sb, "M", M);
+ AppendDimensionString(sb, "I", I);
+ AppendDimensionString(sb, "Θ", Θ);
+ AppendDimensionString(sb, "N", N);
+ AppendDimensionString(sb, "J", J);
+
+ return sb.ToString();
+ }
+
+ private static void AppendDimensionString(StringBuilder sb, string name, int value)
+ {
+ switch (value)
+ {
+ case 0:
+ return;
+ case 1:
+ sb.AppendFormat("[{0}]", name);
+ break;
+ default:
+ sb.AppendFormat("[{0}^{1}]", name, value);
+ break;
+ }
+ }
}
}
diff --git a/CodeGen/JsonTypes/BaseUnits.cs b/CodeGen/JsonTypes/BaseUnits.cs
index d40b54dfeb..ff97054764 100644
--- a/CodeGen/JsonTypes/BaseUnits.cs
+++ b/CodeGen/JsonTypes/BaseUnits.cs
@@ -1,6 +1,9 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+using System;
+using System.Text;
+
namespace CodeGen.JsonTypes
{
internal class BaseUnits
@@ -25,5 +28,34 @@ internal class BaseUnits
// 0649 Field is never assigned to
#pragma warning restore 0649
+
+ ///
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ if (N is { } n) sb.Append($"N={n}, ");
+ if (I is { } i) sb.Append($"I={i}, ");
+ if (L is { } l) sb.Append($"L={l}, ");
+ if (J is { } j) sb.Append($"J={j}, ");
+ if (M is { } m) sb.Append($"M={m}, ");
+ if (Θ is { } θ) sb.Append($"Θ={θ}, ");
+ if (T is { } t) sb.Append($"T={t}, ");
+
+ return sb.ToString().TrimEnd(' ', ',');
+ }
+
+ public BaseUnits Clone()
+ {
+ return new BaseUnits
+ {
+ N = N,
+ I = I,
+ L = L,
+ J = J,
+ M = M,
+ Θ = Θ,
+ T = T
+ };
+ }
}
}
diff --git a/CodeGen/JsonTypes/Quantity.cs b/CodeGen/JsonTypes/Quantity.cs
index 4af26113fc..f471225ad8 100644
--- a/CodeGen/JsonTypes/Quantity.cs
+++ b/CodeGen/JsonTypes/Quantity.cs
@@ -2,22 +2,24 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
+using System.Diagnostics;
namespace CodeGen.JsonTypes
{
- internal class Quantity
+ [DebuggerDisplay("{Name}")]
+ internal record Quantity
{
// 0649 Field is never assigned to
#pragma warning disable 0649
public BaseDimensions BaseDimensions = new(); // Default to empty
- public string ValueType = "double";
public string BaseUnit = null!;
public bool GenerateArithmetic = true;
public bool Logarithmic = false;
public int LogarithmicScalingFactor = 1;
public string Name = null!;
public Unit[] Units = Array.Empty();
+ public QuantityRelation[] Relations = Array.Empty();
public string? XmlDocRemarks;
public string XmlDocSummary = null!;
public string? ObsoleteText;
diff --git a/CodeGen/JsonTypes/QuantityRelation.cs b/CodeGen/JsonTypes/QuantityRelation.cs
new file mode 100644
index 0000000000..35e97a6bc0
--- /dev/null
+++ b/CodeGen/JsonTypes/QuantityRelation.cs
@@ -0,0 +1,35 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+
+namespace CodeGen.JsonTypes
+{
+ internal record QuantityRelation : IComparable
+ {
+ public bool NoInferredDivision = false;
+ public string Operator = null!;
+
+ public Quantity LeftQuantity = null!;
+ public Unit LeftUnit = null!;
+
+ public Quantity RightQuantity = null!;
+ public Unit RightUnit = null!;
+
+ public Quantity ResultQuantity = null!;
+ public Unit ResultUnit = null!;
+
+ public string SortString => ResultQuantity.Name + PrependDot(ResultUnit.SingularName)
+ + " = "
+ + LeftQuantity.Name + PrependDot(LeftUnit.SingularName)
+ + " " + Operator + " "
+ + RightQuantity.Name + PrependDot(RightUnit.SingularName);
+
+ public int CompareTo(QuantityRelation? other)
+ {
+ return string.Compare(SortString, other?.SortString, StringComparison.Ordinal);
+ }
+
+ private static string PrependDot(string? s) => s == null ? string.Empty : "." + s;
+ }
+}
\ No newline at end of file
diff --git a/CodeGen/JsonTypes/Unit.cs b/CodeGen/JsonTypes/Unit.cs
index 4a775c08f9..982dd5a887 100644
--- a/CodeGen/JsonTypes/Unit.cs
+++ b/CodeGen/JsonTypes/Unit.cs
@@ -2,9 +2,11 @@
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
using System;
+using System.Diagnostics;
namespace CodeGen.JsonTypes
{
+ [DebuggerDisplay("{SingularName})")]
internal class Unit
{
// 0649 Field is never assigned to
diff --git a/CodeGen/PrefixInfo.cs b/CodeGen/PrefixInfo.cs
index 1ec641b3b6..e44c643c48 100644
--- a/CodeGen/PrefixInfo.cs
+++ b/CodeGen/PrefixInfo.cs
@@ -15,9 +15,6 @@ internal class PrefixInfo
public static readonly IReadOnlyDictionary Entries = new[]
{
- // Need to append 'd' suffix for double in order to later search/replace "d" with "m"
- // when creating decimal conversion functions in CodeGen.Generator.FixConversionFunctionsForDecimalValueTypes.
-
// SI prefixes
new PrefixInfo(Prefix.Yocto, "1e-24d", "y",(Chinese, "夭")),
new PrefixInfo(Prefix.Zepto, "1e-21d", "z",(Chinese, "仄")),
diff --git a/CodeGen/Program.cs b/CodeGen/Program.cs
index d5589d5d1d..cfeecb0a93 100644
--- a/CodeGen/Program.cs
+++ b/CodeGen/Program.cs
@@ -65,10 +65,12 @@ public static int Main(bool verbose = false, DirectoryInfo? repositoryRoot = nul
if (verbose) Log.Debug("Verbose output enabled");
var sw = Stopwatch.StartNew();
- var quantities = QuantityJsonFilesParser.ParseQuantities(repositoryRoot.FullName);
+ var quantities = QuantityJsonFilesParser.ParseQuantities(rootDir);
QuantityNameToUnitEnumValues quantityNameToUnitEnumValues = UnitEnumValueAllocator.AllocateNewUnitEnumValues($"{rootDir}/Common/UnitEnumValues.g.json", quantities);
+ QuantityRelationsParser.ParseAndApplyRelations(rootDir, quantities);
+
UnitsNetGenerator.Generate(rootDir, quantities, quantityNameToUnitEnumValues);
if (updateNanoFrameworkDependencies)
diff --git a/Common/UnitDefinitions/Acceleration.json b/Common/UnitDefinitions/Acceleration.json
index 8fc62f841e..939df39ce6 100644
--- a/Common/UnitDefinitions/Acceleration.json
+++ b/Common/UnitDefinitions/Acceleration.json
@@ -75,14 +75,14 @@
"L": "NauticalMile",
"T": "Second"
},
- "FromUnitToBaseFunc": "{x} * 0.5144444444444",
- "FromBaseToUnitFunc": "{x} / 0.5144444444444",
+ "FromUnitToBaseFunc": "{x} * (1852.0 / 3600.0)",
+ "FromBaseToUnitFunc": "{x} / (1852.0 / 3600.0)",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kn/s" ]
},
- {
+ {
"Culture": "ru-RU",
"Abbreviations": [ "узел/с" ]
}
@@ -95,14 +95,16 @@
"L": "NauticalMile",
"T": "Minute"
},
- "FromUnitToBaseFunc": "{x} * 0.5144444444444 / 60",
- "FromBaseToUnitFunc": "{x} / 0.5144444444444 * 60",
+ "XmlDocSummary": "The knot (/nɒt/) is a unit of speed equal to one nautical mile per hour, exactly 1.852 km/h (approximately 1.151 mph or 0.514 m/s).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Knot_(unit)",
+ "FromUnitToBaseFunc": "{x} * (1852.0 / 3600.0) / 60",
+ "FromBaseToUnitFunc": "{x} * 60 / (1852.0 / 3600.0)",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kn/min" ]
},
- {
+ {
"Culture": "ru-RU",
"Abbreviations": [ "узел/мин" ]
}
@@ -115,14 +117,16 @@
"L": "NauticalMile",
"T": "Hour"
},
- "FromUnitToBaseFunc": "{x} * 0.5144444444444 / 3600",
- "FromBaseToUnitFunc": "{x} / 0.5144444444444 * 3600",
+ "XmlDocSummary": "The knot (/nɒt/) is a unit of speed equal to one nautical mile per hour, exactly 1.852 km/h (approximately 1.151 mph or 0.514 m/s).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Knot_(unit)",
+ "FromUnitToBaseFunc": "{x} * (1852.0 / 3600.0) / 3600",
+ "FromBaseToUnitFunc": "{x} * 3600 / (1852.0 / 3600.0)",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kn/h" ]
},
- {
+ {
"Culture": "ru-RU",
"Abbreviations": [ "узел/час" ]
}
@@ -131,10 +135,6 @@
{
"SingularName": "StandardGravity",
"PluralName": "StandardGravity",
- "BaseUnits": {
- "L": "Meter",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 9.80665",
"FromBaseToUnitFunc": "{x} / 9.80665",
"Prefixes": [ "Milli"],
diff --git a/Common/UnitDefinitions/Angle.json b/Common/UnitDefinitions/Angle.json
index 1f7b908af1..176335eee4 100644
--- a/Common/UnitDefinitions/Angle.json
+++ b/Common/UnitDefinitions/Angle.json
@@ -1,13 +1,13 @@
{
"Name": "Angle",
- "BaseUnit": "Degree",
+ "BaseUnit": "Radian",
"XmlDocSummary": "In geometry, an angle is the figure formed by two rays, called the sides of the angle, sharing a common endpoint, called the vertex of the angle.",
"Units": [
{
"SingularName": "Radian",
"PluralName": "Radians",
- "FromUnitToBaseFunc": "{x} * 180 / Math.PI",
- "FromBaseToUnitFunc": "{x} / 180 * Math.PI",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci" ],
"Localization": [
{
@@ -24,8 +24,8 @@
"SingularName": "Degree",
"PluralName": "Degrees",
"Prefixes": [ "Nano", "Micro", "Milli" ],
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
+ "FromUnitToBaseFunc": "{x} * Math.PI / 180",
+ "FromBaseToUnitFunc": "{x} * 180 / Math.PI",
"Localization": [
{
"Culture": "en-US",
@@ -40,8 +40,8 @@
{
"SingularName": "Arcminute",
"PluralName": "Arcminutes",
- "FromUnitToBaseFunc": "{x} / 60",
- "FromBaseToUnitFunc": "{x} * 60",
+ "FromUnitToBaseFunc": "{x} * Math.PI / (60 * 180)",
+ "FromBaseToUnitFunc": "{x} * 60 * 180 / Math.PI",
"Localization": [
{
"Culture": "en-US",
@@ -52,8 +52,8 @@
{
"SingularName": "Arcsecond",
"PluralName": "Arcseconds",
- "FromUnitToBaseFunc": "{x} / 3600",
- "FromBaseToUnitFunc": "{x} * 3600",
+ "FromUnitToBaseFunc": "{x} * Math.PI / (3600 * 180)",
+ "FromBaseToUnitFunc": "{x} * 3600 * 180 / Math.PI",
"Localization": [
{
"Culture": "en-US",
@@ -64,8 +64,8 @@
{
"SingularName": "Gradian",
"PluralName": "Gradians",
- "FromUnitToBaseFunc": "{x} * 0.9",
- "FromBaseToUnitFunc": "{x} / 0.9",
+ "FromUnitToBaseFunc": "{x} * Math.PI / 200",
+ "FromBaseToUnitFunc": "{x} * 200 / Math.PI",
"Localization": [
{
"Culture": "en-US",
@@ -80,8 +80,8 @@
{
"SingularName": "NatoMil",
"PluralName": "NatoMils",
- "FromUnitToBaseFunc": "{x} * 9 / 160",
- "FromBaseToUnitFunc": "{x} * 160 / 9",
+ "FromUnitToBaseFunc": "{x} * Math.PI / 3200",
+ "FromBaseToUnitFunc": "{x} * 3200 / Math.PI",
"Localization": [
{
"Culture": "en-US",
@@ -92,8 +92,8 @@
{
"SingularName": "Revolution",
"PluralName": "Revolutions",
- "FromUnitToBaseFunc": "{x} * 360",
- "FromBaseToUnitFunc": "{x} / 360",
+ "FromUnitToBaseFunc": "{x} * 2 * Math.PI",
+ "FromBaseToUnitFunc": "{x} / (2 * Math.PI)",
"Localization": [
{
"Culture": "en-US",
@@ -104,18 +104,6 @@
"Abbreviations": [ "r" ]
}
]
- },
- {
- "SingularName": "Tilt",
- "PluralName": "Tilt",
- "FromUnitToBaseFunc": "Math.Asin({x}) * 180 / Math.PI",
- "FromBaseToUnitFunc": "Math.Sin({x} / 180 * Math.PI)",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "sin(θ)" ]
- }
- ]
}
]
}
diff --git a/Common/UnitDefinitions/ApparentEnergy.json b/Common/UnitDefinitions/ApparentEnergy.json
deleted file mode 100644
index 7f588de3eb..0000000000
--- a/Common/UnitDefinitions/ApparentEnergy.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "Name": "ApparentEnergy",
- "BaseUnit": "VoltampereHour",
- "XmlDocSummary": "A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.",
- "XmlDocRemarks": "ApparentEnergy has been renamed to ElectricApparentEnergy , and will be removed in a later major version.",
- "ObsoleteText": "ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.",
- "BaseDimensions": {
- "L": 2,
- "M": 1,
- "T": -2
- },
- "Units": [
- {
- "SingularName": "VoltampereHour",
- "PluralName": "VoltampereHours",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "VAh" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/ApparentPower.json b/Common/UnitDefinitions/ApparentPower.json
deleted file mode 100644
index 4aebda1a1c..0000000000
--- a/Common/UnitDefinitions/ApparentPower.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "Name": "ApparentPower",
- "BaseUnit": "Voltampere",
- "XmlDocSummary": "Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. Apparent power is the product of the root-mean-square of voltage and current.",
- "XmlDocRemarks": "ApparentPower has been renamed to ElectricApparentPower , and will be removed in a later major version.",
- "ObsoleteText": "ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.",
- "BaseDimensions": {
- "L": 2,
- "M": 1,
- "T": -3
- },
- "Units": [
- {
- "SingularName": "Voltampere",
- "PluralName": "Voltamperes",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Micro", "Milli", "Kilo", "Mega", "Giga" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "VA" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/AreaMomentOfInertia.json b/Common/UnitDefinitions/AreaMomentOfInertia.json
index 3bb85e08f5..55b2bed639 100644
--- a/Common/UnitDefinitions/AreaMomentOfInertia.json
+++ b/Common/UnitDefinitions/AreaMomentOfInertia.json
@@ -72,8 +72,8 @@
"BaseUnits": {
"L": "Foot"
},
- "FromUnitToBaseFunc": "{x} * Math.Pow(0.3048, 4)",
- "FromBaseToUnitFunc": "{x} / Math.Pow(0.3048, 4)",
+ "FromUnitToBaseFunc": "{x} * 0.0086309748412416",
+ "FromBaseToUnitFunc": "{x} / 0.0086309748412416",
"Localization": [
{
"Culture": "en-US",
@@ -87,8 +87,8 @@
"BaseUnits": {
"L": "Inch"
},
- "FromUnitToBaseFunc": "{x} * Math.Pow(2.54e-2, 4)",
- "FromBaseToUnitFunc": "{x} / Math.Pow(2.54e-2, 4)",
+ "FromUnitToBaseFunc": "{x} * 0.0000004162314256",
+ "FromBaseToUnitFunc": "{x} / 0.0000004162314256",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/BitRate.json b/Common/UnitDefinitions/BitRate.json
index 8f2ccd1e37..d5c1b97fa6 100644
--- a/Common/UnitDefinitions/BitRate.json
+++ b/Common/UnitDefinitions/BitRate.json
@@ -1,14 +1,18 @@
{
"Name": "BitRate",
"BaseUnit": "BitPerSecond",
- "ValueType": "decimal",
"XmlDocSummary": "In telecommunications and computing, bit rate is the number of bits that are conveyed or processed per unit of time.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Bit_rate",
- "BaseDimensions": { "T": -1 },
+ "BaseDimensions": {
+ "T": -1
+ },
"Units": [
{
"SingularName": "BitPerSecond",
"PluralName": "BitsPerSecond",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega", "Giga", "Tera", "Peta", "Exa", "Kibi", "Mebi", "Gibi", "Tebi", "Pebi", "Exbi" ],
@@ -22,8 +26,8 @@
{
"SingularName": "BytePerSecond",
"PluralName": "BytesPerSecond",
- "FromUnitToBaseFunc": "{x} * 8m",
- "FromBaseToUnitFunc": "{x} / 8m",
+ "FromUnitToBaseFunc": "{x} * 8",
+ "FromBaseToUnitFunc": "{x} / 8",
"Prefixes": [ "Kilo", "Mega", "Giga", "Tera", "Peta", "Exa", "Kibi", "Mebi", "Gibi", "Tebi", "Pebi", "Exbi" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/BrakeSpecificFuelConsumption.json b/Common/UnitDefinitions/BrakeSpecificFuelConsumption.json
index ff498144da..b059dde220 100644
--- a/Common/UnitDefinitions/BrakeSpecificFuelConsumption.json
+++ b/Common/UnitDefinitions/BrakeSpecificFuelConsumption.json
@@ -22,6 +22,10 @@
{
"SingularName": "KilogramPerJoule",
"PluralName": "KilogramsPerJoule",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -34,8 +38,8 @@
{
"SingularName": "PoundPerMechanicalHorsepowerHour",
"PluralName": "PoundsPerMechanicalHorsepowerHour",
- "FromUnitToBaseFunc": "{x} * 1.689659410672e-7",
- "FromBaseToUnitFunc": "{x} / 1.689659410672e-7",
+ "FromUnitToBaseFunc": "{x} * (0.45359237 / (76.0402249 * 9.80665))/3600",
+ "FromBaseToUnitFunc": "{x} * 3600 / (0.45359237 / (76.0402249 * 9.80665))",
"XmlDocSummary": "The pound per horse power hour uses mechanical horse power and the imperial pound",
"Localization": [
{
diff --git a/Common/UnitDefinitions/Capacitance.json b/Common/UnitDefinitions/Capacitance.json
deleted file mode 100644
index d2f0a0bd5f..0000000000
--- a/Common/UnitDefinitions/Capacitance.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "Name": "Capacitance",
- "BaseUnit": "Farad",
- "XmlDocSummary": "Capacitance is the ability of a body to store an electric charge.",
- "XmlDocRemarks": "Capacitance has been renamed to ElectricCapacitance , and will be removed in a later major version.",
- "ObsoleteText": "Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.",
- "BaseDimensions": {
- "L": -2,
- "M": -1,
- "T": 4,
- "I": 2
- },
- "Units": [
- {
- "SingularName": "Farad",
- "PluralName": "Farads",
- "BaseUnits": {
- "L": "Meter",
- "M": "Kilogram",
- "T": "Second",
- "I": "Ampere"
- },
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "F" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/CoefficientOfThermalExpansion.json b/Common/UnitDefinitions/CoefficientOfThermalExpansion.json
index b861dab5e9..34790d395e 100644
--- a/Common/UnitDefinitions/CoefficientOfThermalExpansion.json
+++ b/Common/UnitDefinitions/CoefficientOfThermalExpansion.json
@@ -6,54 +6,6 @@
"Θ": -1
},
"Units": [
- {
- "SingularName": "InverseKelvin",
- "PluralName": "InverseKelvin",
- "ObsoleteText": "Use PerKelvin instead.",
- "BaseUnits": {
- "Θ": "Kelvin"
- },
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "1/K" ]
- }
- ]
- },
- {
- "SingularName": "InverseDegreeCelsius",
- "PluralName": "InverseDegreeCelsius",
- "ObsoleteText": "Use PerDegreeCelsius instead.",
- "BaseUnits": {
- "Θ": "DegreeCelsius"
- },
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "1/°C" ]
- }
- ]
- },
- {
- "SingularName": "InverseDegreeFahrenheit",
- "PluralName": "InverseDegreeFahrenheit",
- "ObsoleteText": "Use PerDegreeFahrenheit instead.",
- "BaseUnits": {
- "Θ": "DegreeFahrenheit"
- },
- "FromUnitToBaseFunc": "{x} * 9 / 5",
- "FromBaseToUnitFunc": "{x} * 5 / 9",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "1/°F" ]
- }
- ]
- },
{
"SingularName": "PerKelvin",
"PluralName": "PerKelvin",
@@ -102,9 +54,6 @@
{
"SingularName": "PpmPerKelvin",
"PluralName": "PpmPerKelvin",
- "BaseUnits": {
- "Θ": "Kelvin"
- },
"FromUnitToBaseFunc": "{x} / 1e6",
"FromBaseToUnitFunc": "{x} * 1e6",
"Localization": [
@@ -117,9 +66,6 @@
{
"SingularName": "PpmPerDegreeCelsius",
"PluralName": "PpmPerDegreeCelsius",
- "BaseUnits": {
- "Θ": "DegreeCelsius"
- },
"FromUnitToBaseFunc": "{x} / 1e6",
"FromBaseToUnitFunc": "{x} * 1e6",
"Localization": [
@@ -132,9 +78,6 @@
{
"SingularName": "PpmPerDegreeFahrenheit",
"PluralName": "PpmPerDegreeFahrenheit",
- "BaseUnits": {
- "Θ": "DegreeFahrenheit"
- },
"FromUnitToBaseFunc": "{x} * 9 / 5e6",
"FromBaseToUnitFunc": "{x} * 5e6 / 9",
"Localization": [
diff --git a/Common/UnitDefinitions/Density.json b/Common/UnitDefinitions/Density.json
index 25f06d112b..fbcffa7cb1 100644
--- a/Common/UnitDefinitions/Density.json
+++ b/Common/UnitDefinitions/Density.json
@@ -70,8 +70,8 @@
"L": "Inch",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} / 3.6127298147753e-5",
- "FromBaseToUnitFunc": "{x} * 3.6127298147753e-5",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5 / 0.45359237",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -88,8 +88,8 @@
"L": "Foot",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} / 0.062427961",
- "FromBaseToUnitFunc": "{x} * 0.062427961",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592 / 0.45359237",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -102,13 +102,13 @@
{
"SingularName": "PoundPerCubicYard",
"PluralName": "PoundsPerCubicYard",
- "XmlDocSummary": "Calculated from the definition of pound and yard compared to metric kilogram and meter.",
+ "XmlDocSummary": "Calculated from the definition of pound and Cubic yard compared to metric kilogram and meter.",
"BaseUnits": {
"L": "Yard",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} * (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
- "FromBaseToUnitFunc": "{x} / (0.45359237 / 0.9144 / 0.9144 / 0.9144)",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.764554857984",
+ "FromBaseToUnitFunc": "{x} * 0.764554857984 / 0.45359237",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -173,8 +173,8 @@
"L": "Foot",
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} * 515.378818",
- "FromBaseToUnitFunc": "{x} * 0.00194032033",
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 9.80665) / (0.3048 * 0.028316846592)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.028316846592) / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -185,19 +185,23 @@
{
"SingularName": "GramPerLiter",
"PluralName": "GramsPerLiter",
+ "BaseUnits": {
+ "L": "Decimeter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1",
"FromBaseToUnitFunc": "{x} * 1",
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "g/L" ]
+ "Abbreviations": [ "g/l" ]
}
]
},
{
"SingularName": "GramPerDeciliter",
- "PluralName": "GramsPerDeciLiter",
+ "PluralName": "GramsPerDeciliter",
"FromUnitToBaseFunc": "{x} / 1e-1",
"FromBaseToUnitFunc": "{x} * 1e-1",
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
@@ -211,6 +215,10 @@
{
"SingularName": "GramPerMilliliter",
"PluralName": "GramsPerMilliliter",
+ "BaseUnits": {
+ "L": "Centimeter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1e-3",
"FromBaseToUnitFunc": "{x} * 1e-3",
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
@@ -224,8 +232,8 @@
{
"SingularName": "PoundPerUSGallon",
"PluralName": "PoundsPerUSGallon",
- "FromUnitToBaseFunc": "{x} * 1.19826427e2",
- "FromBaseToUnitFunc": "{x} / 1.19826427e2",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.003785411784",
+ "FromBaseToUnitFunc": "{x} * 0.003785411784 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -236,8 +244,8 @@
{
"SingularName": "PoundPerImperialGallon",
"PluralName": "PoundsPerImperialGallon",
- "FromUnitToBaseFunc": "{x} * 9.9776398e1",
- "FromBaseToUnitFunc": "{x} / 9.9776398e1",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.00454609",
+ "FromBaseToUnitFunc": "{x} * 0.00454609 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -268,8 +276,8 @@
"L": "Foot",
"M": "Tonne"
},
- "FromUnitToBaseFunc": "{x} * 3.53146667214886e4",
- "FromBaseToUnitFunc": "{x} / 3.53146667214886e4",
+ "FromUnitToBaseFunc": "{x} * 1000 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592 / 1000",
"Localization": [
{
"Culture": "en-US",
@@ -284,8 +292,8 @@
"L": "Inch",
"M": "Tonne"
},
- "FromUnitToBaseFunc": "{x} * 6.10237440947323e7",
- "FromBaseToUnitFunc": "{x} / 6.10237440947323e7",
+ "FromUnitToBaseFunc": "{x} * 1000 / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5 / 1000",
"Localization": [
{
"Culture": "en-US",
@@ -300,8 +308,8 @@
"L": "Foot",
"M": "Gram"
},
- "FromUnitToBaseFunc": "{x} * 0.0353146667214886",
- "FromBaseToUnitFunc": "{x} / 0.0353146667214886",
+ "FromUnitToBaseFunc": "{x} * 0.001 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592 / 0.001",
"Localization": [
{
"Culture": "en-US",
@@ -316,8 +324,8 @@
"L": "Inch",
"M": "Gram"
},
- "FromUnitToBaseFunc": "{x} * 61.0237440947323",
- "FromBaseToUnitFunc": "{x} / 61.0237440947323",
+ "FromUnitToBaseFunc": "{x} * 0.001 / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5 / 0.001",
"Localization": [
{
"Culture": "en-US",
@@ -332,8 +340,8 @@
"L": "Meter",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} / 2.204622621848775",
- "FromBaseToUnitFunc": "{x} * 2.204622621848775",
+ "FromUnitToBaseFunc": "{x} * 0.45359237",
+ "FromBaseToUnitFunc": "{x} / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -348,8 +356,8 @@
"L": "Centimeter",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} / 2.204622621848775e-6",
- "FromBaseToUnitFunc": "{x} * 2.204622621848775e-6",
+ "FromUnitToBaseFunc": "{x} * 0.45359237e6",
+ "FromBaseToUnitFunc": "{x} / 0.45359237e6",
"Localization": [
{
"Culture": "en-US",
@@ -364,8 +372,8 @@
"L": "Millimeter",
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} / 2.204622621848775e-9",
- "FromBaseToUnitFunc": "{x} * 2.204622621848775e-9",
+ "FromUnitToBaseFunc": "{x} * 0.45359237e9",
+ "FromBaseToUnitFunc": "{x} / 0.45359237e9",
"Localization": [
{
"Culture": "en-US",
@@ -380,8 +388,8 @@
"L": "Meter",
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} * 14.5939",
- "FromBaseToUnitFunc": "{x} / 14.5939",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -396,8 +404,8 @@
"L": "Centimeter",
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} * 14593903",
- "FromBaseToUnitFunc": "{x} / 14593903",
+ "FromUnitToBaseFunc": "{x} * 0.45359237e6 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237e6 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -412,8 +420,8 @@
"L": "Millimeter",
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} * 14593903000",
- "FromBaseToUnitFunc": "{x} / 14593903000",
+ "FromUnitToBaseFunc": "{x} * 0.45359237e9 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237e9 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -428,8 +436,8 @@
"L": "Inch",
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} * 890574.60201535",
- "FromBaseToUnitFunc": "{x} / 890574.60201535",
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 9.80665) / (0.3048 * 1.6387064e-5)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 1.6387064e-5) / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/DynamicViscosity.json b/Common/UnitDefinitions/DynamicViscosity.json
index d42da56383..d5ab8143c9 100644
--- a/Common/UnitDefinitions/DynamicViscosity.json
+++ b/Common/UnitDefinitions/DynamicViscosity.json
@@ -12,6 +12,11 @@
{
"SingularName": "NewtonSecondPerMeterSquared",
"PluralName": "NewtonSecondsPerMeterSquared",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -50,8 +55,8 @@
{
"SingularName": "Reyn",
"PluralName": "Reyns",
- "FromUnitToBaseFunc": "{x} * 6.8947572931683613e3",
- "FromBaseToUnitFunc": "{x} / 6.8947572931683613e3",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -62,8 +67,8 @@
{
"SingularName": "PoundForceSecondPerSquareInch",
"PluralName": "PoundsForceSecondPerSquareInch",
- "FromUnitToBaseFunc": "{x} * 6.8947572931683613e3",
- "FromBaseToUnitFunc": "{x} / 6.8947572931683613e3",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -74,8 +79,8 @@
{
"SingularName": "PoundForceSecondPerSquareFoot",
"PluralName": "PoundsForceSecondPerSquareFoot",
- "FromUnitToBaseFunc": "{x} * 4.7880258980335843e1",
- "FromBaseToUnitFunc": "{x} / 4.7880258980335843e1",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -86,12 +91,12 @@
{
"SingularName": "PoundPerFootSecond",
"PluralName": "PoundsPerFootSecond",
- "FromUnitToBaseFunc": "{x} * 1.4881639",
- "FromBaseToUnitFunc": "{x} / 1.4881639",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "lb/ft·s" ]
+ "Abbreviations": [ "lb/(ft·s)" ]
}
]
}
diff --git a/Common/UnitDefinitions/ElectricAdmittance.json b/Common/UnitDefinitions/ElectricAdmittance.json
index 38c539237b..5f843d752e 100644
--- a/Common/UnitDefinitions/ElectricAdmittance.json
+++ b/Common/UnitDefinitions/ElectricAdmittance.json
@@ -14,6 +14,12 @@
{
"SingularName": "Siemens",
"PluralName": "Siemens",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/ElectricApparentPower.json b/Common/UnitDefinitions/ElectricApparentPower.json
index 4173ef577b..52be88ac11 100644
--- a/Common/UnitDefinitions/ElectricApparentPower.json
+++ b/Common/UnitDefinitions/ElectricApparentPower.json
@@ -12,6 +12,11 @@
{
"SingularName": "Voltampere",
"PluralName": "Voltamperes",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega", "Giga" ],
diff --git a/Common/UnitDefinitions/ElectricCharge.json b/Common/UnitDefinitions/ElectricCharge.json
index 1488af22db..7f3639e57f 100644
--- a/Common/UnitDefinitions/ElectricCharge.json
+++ b/Common/UnitDefinitions/ElectricCharge.json
@@ -11,6 +11,10 @@
{
"SingularName": "Coulomb",
"PluralName": "Coulombs",
+ "BaseUnits": {
+ "I": "Ampere",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],
@@ -24,8 +28,12 @@
{
"SingularName": "AmpereHour",
"PluralName": "AmpereHours",
- "FromUnitToBaseFunc": "{x} / 2.77777777777e-4",
- "FromBaseToUnitFunc": "{x} * 2.77777777777e-4",
+ "BaseUnits": {
+ "I": "Ampere",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 3600",
+ "FromBaseToUnitFunc": "{x} / 3600",
"Prefixes": [ "Milli", "Kilo", "Mega" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/ElectricConductance.json b/Common/UnitDefinitions/ElectricConductance.json
index 910062df0d..46129fe556 100644
--- a/Common/UnitDefinitions/ElectricConductance.json
+++ b/Common/UnitDefinitions/ElectricConductance.json
@@ -13,6 +13,12 @@
{
"SingularName": "Siemens",
"PluralName": "Siemens",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/ElectricConductivity.json b/Common/UnitDefinitions/ElectricConductivity.json
index 2bd4a0033b..c6a143678d 100644
--- a/Common/UnitDefinitions/ElectricConductivity.json
+++ b/Common/UnitDefinitions/ElectricConductivity.json
@@ -31,8 +31,8 @@
{
"SingularName": "SiemensPerInch",
"PluralName": "SiemensPerInch",
- "FromUnitToBaseFunc": "{x} * 3.937007874015748e1",
- "FromBaseToUnitFunc": "{x} / 3.937007874015748e1",
+ "FromUnitToBaseFunc": "{x} / 2.54e-2",
+ "FromBaseToUnitFunc": "{x} * 2.54e-2",
"Localization": [
{
"Culture": "en-US",
@@ -43,8 +43,8 @@
{
"SingularName": "SiemensPerFoot",
"PluralName": "SiemensPerFoot",
- "FromUnitToBaseFunc": "{x} * 3.2808398950131234",
- "FromBaseToUnitFunc": "{x} / 3.2808398950131234",
+ "FromUnitToBaseFunc": "{x} / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/ElectricCurrentDensity.json b/Common/UnitDefinitions/ElectricCurrentDensity.json
index d59571b095..62a5c10735 100644
--- a/Common/UnitDefinitions/ElectricCurrentDensity.json
+++ b/Common/UnitDefinitions/ElectricCurrentDensity.json
@@ -31,8 +31,8 @@
"L": "Inch",
"I": "Ampere"
},
- "FromUnitToBaseFunc": "{x} * 1.5500031000062000e3",
- "FromBaseToUnitFunc": "{x} / 1.5500031000062000e3",
+ "FromUnitToBaseFunc": "{x} / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516",
"Localization": [
{
"Culture": "en-US",
@@ -47,8 +47,8 @@
"L": "Foot",
"I": "Ampere"
},
- "FromUnitToBaseFunc": "{x} * 1.0763910416709722e1",
- "FromBaseToUnitFunc": "{x} / 1.0763910416709722e1",
+ "FromUnitToBaseFunc": "{x} / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/ElectricImpedance.json b/Common/UnitDefinitions/ElectricImpedance.json
index 26c63c8540..74ce901203 100644
--- a/Common/UnitDefinitions/ElectricImpedance.json
+++ b/Common/UnitDefinitions/ElectricImpedance.json
@@ -14,6 +14,12 @@
{
"SingularName": "Ohm",
"PluralName": "Ohms",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/ElectricInductance.json b/Common/UnitDefinitions/ElectricInductance.json
index 54f55a2c7a..bd361f6153 100644
--- a/Common/UnitDefinitions/ElectricInductance.json
+++ b/Common/UnitDefinitions/ElectricInductance.json
@@ -13,6 +13,12 @@
{
"SingularName": "Henry",
"PluralName": "Henries",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli" ],
diff --git a/Common/UnitDefinitions/ElectricPotentialAc.json b/Common/UnitDefinitions/ElectricPotentialAc.json
deleted file mode 100644
index d1f24e7306..0000000000
--- a/Common/UnitDefinitions/ElectricPotentialAc.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "Name": "ElectricPotentialAc",
- "BaseUnit": "VoltAc",
- "XmlDocSummary": "The Electric Potential of a system known to use Alternating Current.",
- "XmlDocRemarks": "ElectricPotentialAc has been merged into ElectricPotential , and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
- "ObsoleteText": "ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
- "Units": [
- {
- "SingularName": "VoltAc",
- "PluralName": "VoltsAc",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "Vac" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/ElectricPotentialChangeRate.json b/Common/UnitDefinitions/ElectricPotentialChangeRate.json
index ed81c5aa1d..9e7a1916a8 100644
--- a/Common/UnitDefinitions/ElectricPotentialChangeRate.json
+++ b/Common/UnitDefinitions/ElectricPotentialChangeRate.json
@@ -11,7 +11,7 @@
"Units": [
{
"SingularName": "VoltPerSecond",
- "PluralName": "VoltsPerSeconds",
+ "PluralName": "VoltsPerSecond",
"BaseUnits": {
"L": "Meter",
"M": "Kilogram",
@@ -30,7 +30,7 @@
},
{
"SingularName": "VoltPerMicrosecond",
- "PluralName": "VoltsPerMicroseconds",
+ "PluralName": "VoltsPerMicrosecond",
"BaseUnits": {
"L": "Meter",
"M": "Kilogram",
@@ -49,7 +49,7 @@
},
{
"SingularName": "VoltPerMinute",
- "PluralName": "VoltsPerMinutes",
+ "PluralName": "VoltsPerMinute",
"BaseUnits": {
"L": "Meter",
"M": "Kilogram",
@@ -68,7 +68,7 @@
},
{
"SingularName": "VoltPerHour",
- "PluralName": "VoltsPerHours",
+ "PluralName": "VoltsPerHour",
"BaseUnits": {
"L": "Meter",
"M": "Kilogram",
diff --git a/Common/UnitDefinitions/ElectricPotentialDc.json b/Common/UnitDefinitions/ElectricPotentialDc.json
deleted file mode 100644
index a79efda133..0000000000
--- a/Common/UnitDefinitions/ElectricPotentialDc.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "Name": "ElectricPotentialDc",
- "BaseUnit": "VoltDc",
- "XmlDocSummary": "The Electric Potential of a system known to use Direct Current.",
- "XmlDocRemarks": "ElectricPotentialDc has been merged into ElectricPotential , and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
- "ObsoleteText": "ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.",
- "Units": [
- {
- "SingularName": "VoltDc",
- "PluralName": "VoltsDc",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Micro", "Milli", "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "Vdc" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/ElectricReactance.json b/Common/UnitDefinitions/ElectricReactance.json
index fb18130d88..80de1301eb 100644
--- a/Common/UnitDefinitions/ElectricReactance.json
+++ b/Common/UnitDefinitions/ElectricReactance.json
@@ -13,6 +13,12 @@
{
"SingularName": "Ohm",
"PluralName": "Ohms",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/ElectricReactivePower.json b/Common/UnitDefinitions/ElectricReactivePower.json
index 8a689161ab..bfcd783412 100644
--- a/Common/UnitDefinitions/ElectricReactivePower.json
+++ b/Common/UnitDefinitions/ElectricReactivePower.json
@@ -12,6 +12,11 @@
{
"SingularName": "VoltampereReactive",
"PluralName": "VoltamperesReactive",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega", "Giga" ],
diff --git a/Common/UnitDefinitions/ElectricResistance.json b/Common/UnitDefinitions/ElectricResistance.json
index edc5c60ece..d705ee2be9 100644
--- a/Common/UnitDefinitions/ElectricResistance.json
+++ b/Common/UnitDefinitions/ElectricResistance.json
@@ -13,6 +13,12 @@
{
"SingularName": "Ohm",
"PluralName": "Ohms",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/ElectricResistivity.json b/Common/UnitDefinitions/ElectricResistivity.json
index 66a90070fb..4d8f621272 100644
--- a/Common/UnitDefinitions/ElectricResistivity.json
+++ b/Common/UnitDefinitions/ElectricResistivity.json
@@ -13,6 +13,12 @@
{
"SingularName": "OhmMeter",
"PluralName": "OhmMeters",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/ElectricSurfaceChargeDensity.json b/Common/UnitDefinitions/ElectricSurfaceChargeDensity.json
index 471a6f828a..41091cb4c8 100644
--- a/Common/UnitDefinitions/ElectricSurfaceChargeDensity.json
+++ b/Common/UnitDefinitions/ElectricSurfaceChargeDensity.json
@@ -51,8 +51,8 @@
"T": "Second",
"I": "Ampere"
},
- "FromUnitToBaseFunc": "{x} * 1.5500031000062000e3",
- "FromBaseToUnitFunc": "{x} / 1.5500031000062000e3",
+ "FromUnitToBaseFunc": "{x} / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/ElectricSusceptance.json b/Common/UnitDefinitions/ElectricSusceptance.json
index 05e8ad37cf..8eeea029e8 100644
--- a/Common/UnitDefinitions/ElectricSusceptance.json
+++ b/Common/UnitDefinitions/ElectricSusceptance.json
@@ -13,6 +13,12 @@
{
"SingularName": "Siemens",
"PluralName": "Siemens",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
diff --git a/Common/UnitDefinitions/Energy.json b/Common/UnitDefinitions/Energy.json
index 7e48f0bdf2..c12d3a934f 100644
--- a/Common/UnitDefinitions/Energy.json
+++ b/Common/UnitDefinitions/Energy.json
@@ -55,8 +55,10 @@
{
"SingularName": "ElectronVolt",
"PluralName": "ElectronVolts",
- "FromUnitToBaseFunc": "{x} * 1.602176565e-19",
- "FromBaseToUnitFunc": "{x} / 1.602176565e-19",
+ "XmlDocSummary": "In physics, an electronvolt (symbol eV, also written electron-volt and electron volt) is the measure of an amount of kinetic energy gained by a single electron accelerating from rest through an electric potential difference of one volt in vacuum. When used as a unit of energy, the numerical value of 1 eV in joules (symbol J) is equivalent to the numerical value of the charge of an electron in coulombs (symbol C). Under the 2019 redefinition of the SI base units, this sets 1 eV equal to the exact value 1.602176634×10−19 J.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Electronvolt",
+ "FromUnitToBaseFunc": "{x} * 1.602176634e-19",
+ "FromBaseToUnitFunc": "{x} / 1.602176634e-19",
"Prefixes": [
"Kilo",
"Mega",
@@ -77,8 +79,10 @@
{
"SingularName": "FootPound",
"PluralName": "FootPounds",
- "FromUnitToBaseFunc": "{x} * 1.355817948",
- "FromBaseToUnitFunc": "{x} / 1.355817948",
+ "XmlDocSummary": "A pound-foot (lb⋅ft), abbreviated from pound-force foot (lbf · ft), is a unit of torque representing one pound of force acting at a perpendicular distance of one foot from a pivot point. Conversely one foot pound-force (ft · lbf) is the moment about an axis that applies one pound-force at a radius of one foot.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Pound-foot_(torque)",
+ "FromUnitToBaseFunc": "{x} * 1.3558179483314004",
+ "FromBaseToUnitFunc": "{x} / 1.3558179483314004",
"Localization": [
{
"Culture": "en-US",
@@ -89,6 +93,8 @@
{
"SingularName": "Erg",
"PluralName": "Ergs",
+ "XmlDocSummary": "The erg is a unit of energy equal to 10−7 joules (100 nJ). It originated in the Centimetre–gram–second system of units (CGS). It has the symbol erg. The erg is not an SI unit. Its name is derived from ergon (ἔργον), a Greek word meaning 'work' or 'task'.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Erg",
"FromUnitToBaseFunc": "{x} * 1e-7",
"FromBaseToUnitFunc": "{x} / 1e-7",
"Localization": [
@@ -135,6 +141,8 @@
{
"SingularName": "ThermEc",
"PluralName": "ThermsEc",
+ "XmlDocSummary": "The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Therm",
"FromUnitToBaseFunc": "{x} * 1.05505585262e8",
"FromBaseToUnitFunc": "{x} / 1.05505585262e8",
"Prefixes": [ "Deca" ],
@@ -154,6 +162,8 @@
{
"SingularName": "ThermUs",
"PluralName": "ThermsUs",
+ "XmlDocSummary": "The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Therm",
"FromUnitToBaseFunc": "{x} * 1.054804e8",
"FromBaseToUnitFunc": "{x} / 1.054804e8",
"Prefixes": [ "Deca" ],
@@ -173,6 +183,8 @@
{
"SingularName": "ThermImperial",
"PluralName": "ThermsImperial",
+ "XmlDocSummary": "The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Therm",
"FromUnitToBaseFunc": "{x} * 1.05505585257348e8",
"FromBaseToUnitFunc": "{x} / 1.05505585257348e8",
"Prefixes": [ "Deca" ],
@@ -192,8 +204,10 @@
{
"SingularName": "HorsepowerHour",
"PluralName": "HorsepowerHours",
- "FromUnitToBaseFunc": "{x} * 2.6845195377e6",
- "FromBaseToUnitFunc": "{x} / 2.6845195377e6",
+ "XmlDocSummary": "A horsepower-hour (symbol: hp⋅h) is an outdated unit of energy, not used in the International System of Units. The unit represents an amount of work a horse is supposed capable of delivering during an hour (1 horsepower integrated over a time interval of an hour).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower-hour",
+ "FromUnitToBaseFunc": "{x} * 76.0402249 * 9.80665 * 3600",
+ "FromBaseToUnitFunc": "{x} / (76.0402249 * 9.80665 * 3600)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Entropy.json b/Common/UnitDefinitions/Entropy.json
index b523c8dd49..1ac13b4c54 100644
--- a/Common/UnitDefinitions/Entropy.json
+++ b/Common/UnitDefinitions/Entropy.json
@@ -12,6 +12,12 @@
{
"SingularName": "JoulePerKelvin",
"PluralName": "JoulesPerKelvin",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -38,6 +44,12 @@
{
"SingularName": "JoulePerDegreeCelsius",
"PluralName": "JoulesPerDegreeCelsius",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo" ],
diff --git a/Common/UnitDefinitions/Force.json b/Common/UnitDefinitions/Force.json
index 675b046598..040f7f749b 100644
--- a/Common/UnitDefinitions/Force.json
+++ b/Common/UnitDefinitions/Force.json
@@ -112,11 +112,6 @@
{
"SingularName": "Poundal",
"PluralName": "Poundals",
- "BaseUnits": {
- "L": "Foot",
- "M": "Pound",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 0.138254954376",
"FromBaseToUnitFunc": "{x} / 0.138254954376",
"XmlDocSummary": "The poundal is defined as the force necessary to accelerate 1 pound-mass at 1 foot per second per second. 1 pdl = 0.138254954376 N exactly.",
diff --git a/Common/UnitDefinitions/ForceChangeRate.json b/Common/UnitDefinitions/ForceChangeRate.json
index 08bb0d754f..8546b4f364 100644
--- a/Common/UnitDefinitions/ForceChangeRate.json
+++ b/Common/UnitDefinitions/ForceChangeRate.json
@@ -24,6 +24,11 @@
{
"SingularName": "NewtonPerSecond",
"PluralName": "NewtonsPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Kilo" ],
@@ -37,8 +42,8 @@
{
"SingularName": "PoundForcePerMinute",
"PluralName": "PoundsForcePerMinute",
- "FromUnitToBaseFunc": "{x} * 4.4482216152605095551842641431421 / 60",
- "FromBaseToUnitFunc": "{x} / 4.4482216152605095551842641431421 * 60",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 60",
+ "FromBaseToUnitFunc": "{x} / 4.4482216152605 * 60",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -51,8 +56,8 @@
{
"SingularName": "PoundForcePerSecond",
"PluralName": "PoundsForcePerSecond",
- "FromUnitToBaseFunc": "{x} * 4.4482216152605095551842641431421",
- "FromBaseToUnitFunc": "{x} / 4.4482216152605095551842641431421",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605",
+ "FromBaseToUnitFunc": "{x} / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/ForcePerLength.json b/Common/UnitDefinitions/ForcePerLength.json
index c5fdb2533a..a5209a996f 100644
--- a/Common/UnitDefinitions/ForcePerLength.json
+++ b/Common/UnitDefinitions/ForcePerLength.json
@@ -10,6 +10,10 @@
{
"SingularName": "NewtonPerMeter",
"PluralName": "NewtonsPerMeter",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Kilo", "Mega" ],
@@ -49,8 +53,8 @@
{
"SingularName": "KilogramForcePerMeter",
"PluralName": "KilogramsForcePerMeter",
- "FromUnitToBaseFunc": "{x} * 9.80665002864",
- "FromBaseToUnitFunc": "{x} / 9.80665002864",
+ "FromUnitToBaseFunc": "{x} * 9.80665",
+ "FromBaseToUnitFunc": "{x} / 9.80665",
"Localization": [
{
"Culture": "en-US",
@@ -65,8 +69,8 @@
{
"SingularName": "KilogramForcePerCentimeter",
"PluralName": "KilogramsForcePerCentimeter",
- "FromUnitToBaseFunc": "{x} * 980.665002864",
- "FromBaseToUnitFunc": "{x} / 980.665002864",
+ "FromUnitToBaseFunc": "{x} * 980.665",
+ "FromBaseToUnitFunc": "{x} / 980.665",
"Localization": [
{
"Culture": "en-US",
@@ -81,8 +85,8 @@
{
"SingularName": "KilogramForcePerMillimeter",
"PluralName": "KilogramsForcePerMillimeter",
- "FromUnitToBaseFunc": "{x} * 9.80665002864e3",
- "FromBaseToUnitFunc": "{x} / 9.80665002864e3",
+ "FromUnitToBaseFunc": "{x} * 9.80665e3",
+ "FromBaseToUnitFunc": "{x} / 9.80665e3",
"Localization": [
{
"Culture": "en-US",
@@ -97,8 +101,8 @@
{
"SingularName": "TonneForcePerMeter",
"PluralName": "TonnesForcePerMeter",
- "FromUnitToBaseFunc": "{x} * 9.80665002864e3",
- "FromBaseToUnitFunc": "{x} / 9.80665002864e3",
+ "FromUnitToBaseFunc": "{x} * 9.80665e3",
+ "FromBaseToUnitFunc": "{x} / 9.80665e3",
"Localization": [
{
"Culture": "en-US",
@@ -113,8 +117,8 @@
{
"SingularName": "TonneForcePerCentimeter",
"PluralName": "TonnesForcePerCentimeter",
- "FromUnitToBaseFunc": "{x} * 9.80665002864e5",
- "FromBaseToUnitFunc": "{x} / 9.80665002864e5",
+ "FromUnitToBaseFunc": "{x} * 9.80665e5",
+ "FromBaseToUnitFunc": "{x} / 9.80665e5",
"Localization": [
{
"Culture": "en-US",
@@ -129,8 +133,8 @@
{
"SingularName": "TonneForcePerMillimeter",
"PluralName": "TonnesForcePerMillimeter",
- "FromUnitToBaseFunc": "{x} * 9.80665002864e6",
- "FromBaseToUnitFunc": "{x} / 9.80665002864e6",
+ "FromUnitToBaseFunc": "{x} * 9.80665e6",
+ "FromBaseToUnitFunc": "{x} / 9.80665e6",
"Localization": [
{
"Culture": "en-US",
@@ -145,8 +149,8 @@
{
"SingularName": "PoundForcePerFoot",
"PluralName": "PoundsForcePerFoot",
- "FromUnitToBaseFunc": "{x} * 14.59390292",
- "FromBaseToUnitFunc": "{x} / 14.59390292",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -157,8 +161,8 @@
{
"SingularName": "PoundForcePerInch",
"PluralName": "PoundsForcePerInch",
- "FromUnitToBaseFunc": "{x} * 1.75126835e2",
- "FromBaseToUnitFunc": "{x} / 1.75126835e2",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 2.54e-2",
+ "FromBaseToUnitFunc": "{x} * 2.54e-2 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -169,8 +173,8 @@
{
"SingularName": "PoundForcePerYard",
"PluralName": "PoundsForcePerYard",
- "FromUnitToBaseFunc": "{x} * 4.864634307",
- "FromBaseToUnitFunc": "{x} / 4.864634307",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.9144",
+ "FromBaseToUnitFunc": "{x} * 0.9144 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -181,8 +185,8 @@
{
"SingularName": "KilopoundForcePerFoot",
"PluralName": "KilopoundsForcePerFoot",
- "FromUnitToBaseFunc": "{x} * 14593.90292",
- "FromBaseToUnitFunc": "{x} / 14593.90292",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.3048e-3",
+ "FromBaseToUnitFunc": "{x} * 0.3048e-3 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
@@ -190,11 +194,11 @@
}
]
},
- {
+ {
"SingularName": "KilopoundForcePerInch",
"PluralName": "KilopoundsForcePerInch",
- "FromUnitToBaseFunc": "{x} * 1.75126835e5",
- "FromBaseToUnitFunc": "{x} / 1.75126835e5",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 2.54e-5",
+ "FromBaseToUnitFunc": "{x} * 2.54e-5 / 4.4482216152605",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Frequency.json b/Common/UnitDefinitions/Frequency.json
index 8bbf4f1862..d51919c73f 100644
--- a/Common/UnitDefinitions/Frequency.json
+++ b/Common/UnitDefinitions/Frequency.json
@@ -9,6 +9,9 @@
{
"SingularName": "Hertz",
"PluralName": "Hertz",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Micro", "Milli", "Kilo", "Mega", "Giga", "Tera" ],
@@ -26,8 +29,10 @@
{
"SingularName": "RadianPerSecond",
"PluralName": "RadiansPerSecond",
- "FromUnitToBaseFunc": "{x} / 6.2831853072",
- "FromBaseToUnitFunc": "{x} * 6.2831853072",
+ "XmlDocSummary": "In SI units, angular frequency is normally presented with the unit radian per second, and need not express a rotational value. The unit hertz (Hz) is dimensionally equivalent, but by convention it is only used for frequency f, never for angular frequency ω. This convention is used to help avoid the confusion that arises when dealing with quantities such as frequency and angular quantities because the units of measure (such as cycle or radian) are considered to be one and hence may be omitted when expressing quantities in terms of SI units.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Angular_frequency",
+ "FromUnitToBaseFunc": "{x} / (2 * Math.PI)",
+ "FromBaseToUnitFunc": "{x} * (2 * Math.PI)",
"OmitExtensionMethod": true,
"Localization": [
{
@@ -43,6 +48,9 @@
{
"SingularName": "CyclePerMinute",
"PluralName": "CyclesPerMinute",
+ "BaseUnits": {
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
@@ -55,6 +63,9 @@
{
"SingularName": "CyclePerHour",
"PluralName": "CyclesPerHour",
+ "BaseUnits": {
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
@@ -67,6 +78,9 @@
{
"SingularName": "BeatPerMinute",
"PluralName": "BeatsPerMinute",
+ "BaseUnits": {
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
@@ -79,6 +93,9 @@
{
"SingularName": "PerSecond",
"PluralName": "PerSecond",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -91,18 +108,6 @@
"Abbreviations": [ "с⁻¹" ]
}
]
- },
- {
- "SingularName": "BUnit",
- "PluralName": "BUnits",
- "FromUnitToBaseFunc": "Math.Sqrt({x} * 1e3)",
- "FromBaseToUnitFunc": "{x} * {x} * 1e-3",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "B Units" ]
- }
- ]
}
]
}
diff --git a/Common/UnitDefinitions/FuelEfficiency.json b/Common/UnitDefinitions/FuelEfficiency.json
index d0a27ce366..d018d437ba 100644
--- a/Common/UnitDefinitions/FuelEfficiency.json
+++ b/Common/UnitDefinitions/FuelEfficiency.json
@@ -1,55 +1,67 @@
{
- "Name": "FuelEfficiency",
- "BaseUnit": "LiterPer100Kilometers",
- "XmlDocSummary": "Fuel efficiency is a form of thermal efficiency, meaning the ratio from effort to result of a process that converts chemical potential energy contained in a carrier (fuel) into kinetic energy or work. Fuel economy is stated as \"fuel consumption\" in liters per 100 kilometers (L/100 km). In countries using non-metric system, fuel economy is expressed in miles per gallon (mpg) (imperial galon or US galon).",
- "XmlDocRemarks": "https://en.wikipedia.org/wiki/Fuel_efficiency",
- "Units": [{
- "SingularName": "LiterPer100Kilometers",
- "PluralName": "LitersPer100Kilometers",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Localization": [{
+ "Name": "FuelEfficiency",
+ "BaseUnit": "KilometerPerLiter",
+ "XmlDocSummary": "In the context of transport, fuel economy is the energy efficiency of a particular vehicle, given as a ratio of distance traveled per unit of fuel consumed. In most countries, using the metric system, fuel economy is stated as \"fuel consumption\" in liters per 100 kilometers (L/100 km) or kilometers per liter (km/L or kmpl). In countries using non-metric system, fuel economy is expressed in miles per gallon (mpg) (imperial galon or US galon).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Fuel_efficiency",
+ "BaseDimensions": {
+ "L": -2
+ },
+ "Units": [
+ {
+ "SingularName": "LiterPer100Kilometers",
+ "PluralName": "LitersPer100Kilometers",
+ "FromUnitToBaseFunc": "100 / {x}",
+ "FromBaseToUnitFunc": "100 / {x}",
+ "Localization": [
+ {
"Culture": "en-US",
"Abbreviations": [
- "L/100km"
+ "l/100km"
]
- }]
- },
- {
- "SingularName": "MilePerUsGallon",
- "PluralName": "MilesPerUsGallon",
- "FromUnitToBaseFunc": "(100 * 3.785411784) / (1.609344 * {x})",
- "FromBaseToUnitFunc": "(100 * 3.785411784) / (1.609344 * {x})",
- "Localization": [{
+ }
+ ]
+ },
+ {
+ "SingularName": "MilePerUsGallon",
+ "PluralName": "MilesPerUsGallon",
+ "FromUnitToBaseFunc": "{x} * 1.609344 / 3.785411784",
+ "FromBaseToUnitFunc": "{x} * 3.785411784 / 1.609344",
+ "Localization": [
+ {
"Culture": "en-US",
"Abbreviations": [
"mpg (U.S.)"
]
- }]
- },
- {
- "SingularName": "MilePerUkGallon",
- "PluralName": "MilesPerUkGallon",
- "FromUnitToBaseFunc": "(100 * 4.54609188) / (1.609344 * {x})",
- "FromBaseToUnitFunc": "(100 * 4.54609188) / (1.609344 * {x})",
- "Localization": [{
+ }
+ ]
+ },
+ {
+ "SingularName": "MilePerUkGallon",
+ "PluralName": "MilesPerUkGallon",
+ "FromUnitToBaseFunc": "{x} * 1.609344 / 4.54609",
+ "FromBaseToUnitFunc": "{x} * 4.54609 / 1.609344",
+ "Localization": [
+ {
"Culture": "en-US",
"Abbreviations": [
"mpg (imp.)"
]
- }]
- },
- {
- "SingularName": "KilometerPerLiter",
- "PluralName": "KilometersPerLiters",
- "FromUnitToBaseFunc": "100 / {x}",
- "FromBaseToUnitFunc": "100 / {x}",
- "Localization": [{
+ }
+ ]
+ },
+ {
+ "SingularName": "KilometerPerLiter",
+ "PluralName": "KilometersPerLiter",
+ "FromUnitToBaseFunc": "{x}",
+ "FromBaseToUnitFunc": "{x}",
+ "Localization": [
+ {
"Culture": "en-US",
"Abbreviations": [
- "km/L"
+ "km/l"
]
- }]
- }
- ]
- }
\ No newline at end of file
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Common/UnitDefinitions/HeatFlux.json b/Common/UnitDefinitions/HeatFlux.json
index 2fd41d7dc7..9d3204a3dd 100644
--- a/Common/UnitDefinitions/HeatFlux.json
+++ b/Common/UnitDefinitions/HeatFlux.json
@@ -27,8 +27,8 @@
{
"SingularName": "WattPerSquareInch",
"PluralName": "WattsPerSquareInch",
- "FromUnitToBaseFunc": "{x} * 1.5500031e3",
- "FromBaseToUnitFunc": "{x} / 1.5500031e3",
+ "FromUnitToBaseFunc": "{x} / (2.54e-2 * 2.54e-2)",
+ "FromBaseToUnitFunc": "{x} * (2.54e-2 * 2.54e-2)",
"Localization": [
{
"Culture": "en-US",
@@ -39,8 +39,8 @@
{
"SingularName": "WattPerSquareFoot",
"PluralName": "WattsPerSquareFoot",
- "FromUnitToBaseFunc": "{x} * 1.07639e1",
- "FromBaseToUnitFunc": "{x} / 1.07639e1",
+ "FromUnitToBaseFunc": "{x} / (0.3048 * 0.3048)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.3048)",
"Localization": [
{
"Culture": "en-US",
@@ -51,81 +51,85 @@
{
"SingularName": "BtuPerSecondSquareInch",
"PluralName": "BtusPerSecondSquareInch",
- "FromUnitToBaseFunc": "{x} * 1.63533984e6",
- "FromBaseToUnitFunc": "{x} / 1.63533984e6",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / (2.54e-2 * 2.54e-2)",
+ "FromBaseToUnitFunc": "{x} * (2.54e-2 * 2.54e-2) / 1055.05585262",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/s·in²" ]
+ "Abbreviations": [ "BTU/(s·in²)" ]
}
]
},
{
"SingularName": "BtuPerSecondSquareFoot",
"PluralName": "BtusPerSecondSquareFoot",
- "FromUnitToBaseFunc": "{x} * 1.13565267e4",
- "FromBaseToUnitFunc": "{x} / 1.13565267e4",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / (0.3048 * 0.3048)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.3048) / 1055.05585262",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/s·ft²" ]
+ "Abbreviations": [ "BTU/(s·ft²)" ]
}
]
},
{
"SingularName": "BtuPerMinuteSquareFoot",
"PluralName": "BtusPerMinuteSquareFoot",
- "FromUnitToBaseFunc": "{x} * 1.89275445e2",
- "FromBaseToUnitFunc": "{x} / 1.89275445e2",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / (0.3048 * 0.3048 * 60)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.3048 * 60) / 1055.05585262",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/min·ft²" ]
+ "Abbreviations": [ "BTU/(min·ft²)" ]
}
]
},
{
"SingularName": "BtuPerHourSquareFoot",
"PluralName": "BtusPerHourSquareFoot",
- "FromUnitToBaseFunc": "{x} * 3.15459075",
- "FromBaseToUnitFunc": "{x} / 3.15459075",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / (0.3048 * 0.3048 * 3600)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.3048 * 3600) / 1055.05585262",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/h·ft²" ]
+ "Abbreviations": [ "BTU/(h·ft²)" ]
}
]
},
{
"SingularName": "CaloriePerSecondSquareCentimeter",
"PluralName": "CaloriesPerSecondSquareCentimeter",
- "FromUnitToBaseFunc": "{x} * 4.1868e4",
- "FromBaseToUnitFunc": "{x} / 4.1868e4",
+ "FromUnitToBaseFunc": "{x} * 4.184e4",
+ "FromBaseToUnitFunc": "{x} / 4.184e4",
"Prefixes": [ "Kilo" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "cal/s·cm²" ]
+ "Abbreviations": [ "cal/(s·cm²)" ]
}
]
},
{
"SingularName": "KilocaloriePerHourSquareMeter",
"PluralName": "KilocaloriesPerHourSquareMeter",
- "FromUnitToBaseFunc": "{x} * 1.163",
- "FromBaseToUnitFunc": "{x} / 1.163",
+ "FromUnitToBaseFunc": "{x} * 4.184e3 / 3600",
+ "FromBaseToUnitFunc": "{x} * 3600 / 4.184e3",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "kcal/h·m²" ]
+ "Abbreviations": [ "kcal/(h·m²)" ]
}
]
},
{
"SingularName": "PoundForcePerFootSecond",
"PluralName": "PoundsForcePerFootSecond",
- "FromUnitToBaseFunc": "{x} * 1.459390293720636e1",
- "FromBaseToUnitFunc": "{x} / 1.459390293720636e1",
+ "FromUnitToBaseFunc": "{x} * 1.3558179483314004 / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2 / 1.3558179483314004",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/HeatTransferCoefficient.json b/Common/UnitDefinitions/HeatTransferCoefficient.json
index 75db786ba7..f3108375f2 100644
--- a/Common/UnitDefinitions/HeatTransferCoefficient.json
+++ b/Common/UnitDefinitions/HeatTransferCoefficient.json
@@ -11,49 +11,46 @@
{
"SingularName": "WattPerSquareMeterKelvin",
"PluralName": "WattsPerSquareMeterKelvin",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "W/m²·K" ]
+ "Abbreviations": [ "W/(m²·K)" ]
}
]
},
{
"SingularName": "WattPerSquareMeterCelsius",
"PluralName": "WattsPerSquareMeterCelsius",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "W/m²·°C" ]
- }
- ]
- },
- {
- "SingularName": "BtuPerSquareFootDegreeFahrenheit",
- "PluralName": "BtusPerSquareFootDegreeFahrenheit",
- "ObsoleteText": "The name of this definition incorrectly omitted time as divisor, please use BtuPerHourSquareFootDegreeFahrenheit instead",
- "FromUnitToBaseFunc": "{x} * 5.6782633411134878",
- "FromBaseToUnitFunc": "{x} / 5.6782633411134878",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "Btu/ft²·°F" ]
+ "Abbreviations": [ "W/(m²·°C)" ]
}
]
},
{
"SingularName": "BtuPerHourSquareFootDegreeFahrenheit",
"PluralName": "BtusPerHourSquareFootDegreeFahrenheit",
- "FromUnitToBaseFunc": "{x} * 5.6782633411134878",
- "FromBaseToUnitFunc": "{x} / 5.6782633411134878",
+ "FromUnitToBaseFunc": "{x} * ((1055.05585262 / (0.3048 * 0.3048 * 3600)) * 1.8)",
+ "FromBaseToUnitFunc": "{x} / ((1055.05585262 / (0.3048 * 0.3048 * 3600)) * 1.8)",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F" ]
+ "Abbreviations": [ "Btu/(h·ft²·°F)", "Btu/(ft²·h·°F)", "Btu/(hr·ft²·°F)", "Btu/(ft²·hr·°F)" ]
}
]
},
@@ -61,12 +58,12 @@
"SingularName": "CaloriePerHourSquareMeterDegreeCelsius",
"PluralName": "CaloriesPerHourSquareMeterDegreeCelsius",
"Prefixes": [ "Kilo" ],
- "FromUnitToBaseFunc": "({x} * 4.1868) / 3600",
- "FromBaseToUnitFunc": "({x} / 4.1868) * 3600",
+ "FromUnitToBaseFunc": "({x} * 4.184) / 3600",
+ "FromBaseToUnitFunc": "({x} / 4.184) * 3600",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C" ]
+ "Abbreviations": [ "kcal/(h·m²·°C)", "kcal/(m²·h·°C)", "kcal/(hr·m²·°C)", "kcal/(m²·hr·°C)" ]
}
]
}
diff --git a/Common/UnitDefinitions/Illuminance.json b/Common/UnitDefinitions/Illuminance.json
index 2c8b07c52f..187b9d1226 100644
--- a/Common/UnitDefinitions/Illuminance.json
+++ b/Common/UnitDefinitions/Illuminance.json
@@ -11,6 +11,10 @@
{
"SingularName": "Lux",
"PluralName": "Lux",
+ "BaseUnits": {
+ "L": "Meter",
+ "J": "Candela"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Milli", "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/Impulse.json b/Common/UnitDefinitions/Impulse.json
index bc111e0103..193041b8ed 100644
--- a/Common/UnitDefinitions/Impulse.json
+++ b/Common/UnitDefinitions/Impulse.json
@@ -11,6 +11,11 @@
{
"SingularName": "KilogramMeterPerSecond",
"PluralName": "KilogramMetersPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -23,6 +28,11 @@
{
"SingularName": "NewtonSecond",
"PluralName": "NewtonSeconds",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Kilo", "Mega" ],
@@ -36,8 +46,13 @@
{
"SingularName": "PoundFootPerSecond",
"PluralName": "PoundFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 7.230657989877",
- "FromBaseToUnitFunc": "{x} * 7.230657989877",
+ "BaseUnits": {
+ "L": "Foot",
+ "M": "Pound",
+ "T": "Second"
+ },
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 0.3048)",
+ "FromBaseToUnitFunc": "{x} / (0.45359237 * 0.3048)",
"Localization": [
{
"Culture": "en-US",
@@ -48,8 +63,8 @@
{
"SingularName": "PoundForceSecond",
"PluralName": "PoundForceSeconds",
- "FromUnitToBaseFunc": "{x} / 0.2248089430997",
- "FromBaseToUnitFunc": "{x} * 0.2248089430997",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 * 9.80665",
+ "FromBaseToUnitFunc": "{x} / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -60,8 +75,13 @@
{
"SingularName": "SlugFootPerSecond",
"PluralName": "SlugFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 0.224735720691",
- "FromBaseToUnitFunc": "{x} * 0.224735720691",
+ "BaseUnits": {
+ "L": "Foot",
+ "M": "Slug",
+ "T": "Second"
+ },
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 9.80665)",
+ "FromBaseToUnitFunc": "{x} / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Information.json b/Common/UnitDefinitions/Information.json
index 39cb9f0636..f327f00ca5 100644
--- a/Common/UnitDefinitions/Information.json
+++ b/Common/UnitDefinitions/Information.json
@@ -1,14 +1,13 @@
{
"Name": "Information",
"BaseUnit": "Bit",
- "ValueType": "decimal",
"XmlDocSummary": "In computing and telecommunications, a unit of information is the capacity of some standard data storage system or communication channel, used to measure the capacities of other systems and channels. In information theory, units of information are also used to measure the information contents or entropy of random variables.",
"Units": [
{
"SingularName": "Byte",
"PluralName": "Bytes",
- "FromUnitToBaseFunc": "{x} * 8m",
- "FromBaseToUnitFunc": "{x} / 8m",
+ "FromUnitToBaseFunc": "{x} * 8",
+ "FromBaseToUnitFunc": "{x} / 8",
"Prefixes": [ "Kilo", "Mega", "Giga", "Tera", "Peta", "Exa", "Kibi", "Mebi", "Gibi", "Tebi", "Pebi", "Exbi" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/Irradiance.json b/Common/UnitDefinitions/Irradiance.json
index 6608bdfb98..50d92bb8b9 100644
--- a/Common/UnitDefinitions/Irradiance.json
+++ b/Common/UnitDefinitions/Irradiance.json
@@ -10,6 +10,10 @@
{
"SingularName": "WattPerSquareMeter",
"PluralName": "WattsPerSquareMeter",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/Irradiation.json b/Common/UnitDefinitions/Irradiation.json
index 3689cd0db4..b80882b633 100644
--- a/Common/UnitDefinitions/Irradiation.json
+++ b/Common/UnitDefinitions/Irradiation.json
@@ -11,6 +11,10 @@
{
"SingularName": "JoulePerSquareMeter",
"PluralName": "JoulesPerSquareMeter",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo" ],
@@ -62,8 +66,8 @@
{
"SingularName": "BtuPerSquareFoot",
"PluralName": "BtusPerSquareFoot",
- "FromUnitToBaseFunc": "{x} * (52752792631d / 4645152d)",
- "FromBaseToUnitFunc": "{x} / (52752792631d / 4645152d)",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2 / 1055.05585262",
"Prefixes": [ "Kilo" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/Jerk.json b/Common/UnitDefinitions/Jerk.json
index c2cf906e84..99d4855f90 100644
--- a/Common/UnitDefinitions/Jerk.json
+++ b/Common/UnitDefinitions/Jerk.json
@@ -71,10 +71,6 @@
{
"SingularName": "StandardGravitiesPerSecond",
"PluralName": "StandardGravitiesPerSecond",
- "BaseUnits": {
- "L": "Meter",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 9.80665",
"FromBaseToUnitFunc": "{x} / 9.80665",
"Prefixes": [ "Milli"],
diff --git a/Common/UnitDefinitions/KinematicViscosity.json b/Common/UnitDefinitions/KinematicViscosity.json
index 5de0e4c458..a40ec9a10b 100644
--- a/Common/UnitDefinitions/KinematicViscosity.json
+++ b/Common/UnitDefinitions/KinematicViscosity.json
@@ -11,6 +11,10 @@
{
"SingularName": "SquareMeterPerSecond",
"PluralName": "SquareMetersPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -44,8 +48,12 @@
{
"SingularName": "SquareFootPerSecond",
"PluralName": "SquareFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 10.7639",
- "FromBaseToUnitFunc": "{x} * 10.7639",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Second"
+ },
+ "FromUnitToBaseFunc": "{x} * 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} / 9.290304e-2",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/LeakRate.json b/Common/UnitDefinitions/LeakRate.json
index 14654f3501..eb4f59919b 100644
--- a/Common/UnitDefinitions/LeakRate.json
+++ b/Common/UnitDefinitions/LeakRate.json
@@ -12,6 +12,11 @@
{
"SingularName": "PascalCubicMeterPerSecond",
"PluralName": "PascalCubicMetersPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/Length.json b/Common/UnitDefinitions/Length.json
index 728e38602a..cb3419436e 100644
--- a/Common/UnitDefinitions/Length.json
+++ b/Common/UnitDefinitions/Length.json
@@ -90,6 +90,8 @@
"FromUnitToBaseFunc": "{x} * 0.3048",
"FromBaseToUnitFunc": "{x} / 0.3048",
"Prefixes": [ "Kilo" ],
+ "XmlDocSummary": "The foot (pl. feet; standard symbol: ft) is a unit of length in the British imperial and United States customary systems of measurement. The prime symbol, ′, is commonly used to represent the foot. In both customary and imperial units, one foot comprises 12 inches, and one yard comprises three feet. Since an international agreement in 1959, the foot is defined as equal to exactly 0.3048 meters.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Foot_(unit)",
"Localization": [
{
"Culture": "en-US",
@@ -130,6 +132,8 @@
},
"FromUnitToBaseFunc": "{x} * 2.54e-2",
"FromBaseToUnitFunc": "{x} / 2.54e-2",
+ "XmlDocSummary": "The inch (symbol: in or ″) is a unit of length in the British Imperial and the United States customary systems of measurement. It is equal to 1/36 yard or 1/12 of a foot. Derived from the Roman uncia (\"twelfth\"), the word inch is also sometimes used to translate similar units in other measurement systems, usually understood as deriving from the width of the human thumb.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Inch",
"Localization": [
{
"Culture": "en-US",
@@ -250,8 +254,10 @@
"BaseUnits": {
"L": "PrinterPoint"
},
- "FromUnitToBaseFunc": "({x} / 72.27) * 2.54e-2",
- "FromBaseToUnitFunc": "({x} / 2.54e-2) * 72.27",
+ "XmlDocSummary": "In typography, the point is the smallest unit of measure. It is used for measuring font size, leading, and other items on a printed page. In modern times this size of the point has been approximated as exactly 1⁄72.27 (0.01383700013837) of the inch by Donald Knuth for the default unit of his TeX computer typesetting system and is thus sometimes known as the TeX point.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Point_(typography)",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 / 72.27 ",
+ "FromBaseToUnitFunc": "{x} * 72.27 / 2.54e-2",
"Localization": [
{
"Culture": "en-US",
@@ -265,8 +271,10 @@
"BaseUnits": {
"L": "DtpPoint"
},
- "FromUnitToBaseFunc": "({x} / 72) * 2.54e-2",
- "FromBaseToUnitFunc": "({x} / 2.54e-2) * 72",
+ "XmlDocSummary": "The desktop publishing point (DTP) is defined as 1⁄72 of an inch (1/72 × 25.4 mm ≈ 0.353 mm) and, as with earlier American point sizes, is considered to be 1⁄12 of a pica.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Point_(typography)",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 / 72",
+ "FromBaseToUnitFunc": "{x} * 72 / 2.54e-2",
"Localization": [
{
"Culture": "en-US",
@@ -280,8 +288,10 @@
"BaseUnits": {
"L": "PrinterPica"
},
- "FromUnitToBaseFunc": "{x} / 237.106301584",
- "FromBaseToUnitFunc": "{x} * 237.106301584",
+ "XmlDocSummary": "The American pica of 0.16604 inches (~4.217 mm) was established by the United States Type Founders' Association in 1886. In TeX one pica is 400⁄2409 of an inch.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Pica_(typography)",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 * 400 / 2409",
+ "FromBaseToUnitFunc": "{x} / (2.54e-2 * 400 / 2409)",
"Localization": [
{
"Culture": "en-US",
@@ -295,8 +305,10 @@
"BaseUnits": {
"L": "DtpPica"
},
- "FromUnitToBaseFunc": "{x} / 236.220472441",
- "FromBaseToUnitFunc": "{x} * 236.220472441",
+ "XmlDocSummary": "The pica is a typographic unit of measure corresponding to approximately 1⁄6 of an inch, or from 1⁄68 to 1⁄73 of a foot. One pica is further divided into 12 points.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Pica_(typography)",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 / 6",
+ "FromBaseToUnitFunc": "{x} * 6 / 2.54e-2",
"Localization": [
{
"Culture": "en-US",
@@ -310,8 +322,10 @@
"BaseUnits": {
"L": "Twip"
},
- "FromUnitToBaseFunc": "{x} / 56692.913385826",
- "FromBaseToUnitFunc": "{x} * 56692.913385826",
+ "XmlDocSummary": "A twip (abbreviating \"twentieth of a point\" or \"twentieth of an inch point\") is a typographical measurement, defined as 1⁄20 of a typographical point. One twip is 1⁄1440 inch, or ~17.64 μm.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Twip",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 / 1440",
+ "FromBaseToUnitFunc": "{x} * 1440 / 2.54e-2",
"Localization": [
{
"Culture": "en-US",
@@ -325,6 +339,8 @@
"BaseUnits": {
"L": "Hand"
},
+ "XmlDocSummary": "The hand is a non-SI unit of measurement of length standardized to 4 in (101.6 mm). It is used to measure the height of horses in many English-speaking countries, including Australia, Canada, Ireland, the United Kingdom, and the United States. It was originally based on the breadth of a human hand.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Hand_(unit)",
"FromUnitToBaseFunc": "{x} * 1.016e-1",
"FromBaseToUnitFunc": "{x} / 1.016e-1",
"Localization": [
@@ -337,6 +353,9 @@
{
"SingularName": "AstronomicalUnit",
"PluralName": "AstronomicalUnits",
+ "BaseUnits": {
+ "L": "AstronomicalUnit"
+ },
"FromUnitToBaseFunc": "{x} * 1.4959787070e11",
"FromBaseToUnitFunc": "{x} / 1.4959787070e11",
"XmlDocSummary": "One Astronomical Unit is the distance from the solar system Star, the sun, to planet Earth.",
@@ -351,6 +370,9 @@
{
"SingularName": "Parsec",
"PluralName": "Parsecs",
+ "BaseUnits": {
+ "L": "Parsec"
+ },
"FromUnitToBaseFunc": "{x} * 3.08567758128e16",
"FromBaseToUnitFunc": "{x} / 3.08567758128e16",
"XmlDocSummary": "A parsec is defined as the distance at which one astronomical unit (AU) subtends an angle of one arcsecond.",
@@ -366,6 +388,9 @@
{
"SingularName": "LightYear",
"PluralName": "LightYears",
+ "BaseUnits": {
+ "L": "LightYear"
+ },
"FromUnitToBaseFunc": "{x} * 9.46073047258e15",
"FromBaseToUnitFunc": "{x} / 9.46073047258e15",
"XmlDocSummary": "A Light Year (ly) is the distance that light travel during an Earth year, ie 365 days.",
@@ -381,6 +406,9 @@
{
"SingularName": "SolarRadius",
"PluralName": "SolarRadiuses",
+ "BaseUnits": {
+ "L": "SolarRadius"
+ },
"FromUnitToBaseFunc": "{x} * 6.95700e8",
"FromBaseToUnitFunc": "{x} / 6.95700e8",
"XmlDocSummary": "Solar radius is a ratio unit to the radius of the solar system star, the sun.",
@@ -398,6 +426,8 @@
"BaseUnits": {
"L": "Chain"
},
+ "XmlDocSummary": "The chain (abbreviated ch) is a unit of length equal to 66 feet (22 yards), used in both the US customary and Imperial unit systems. It is subdivided into 100 links. There are 10 chains in a furlong, and 80 chains in one statute mile. In metric terms, it is 20.1168 m long.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Chain_(unit)",
"FromUnitToBaseFunc": "{x} * 20.1168",
"FromBaseToUnitFunc": "{x} / 20.1168",
"Localization": [
@@ -410,6 +440,9 @@
{
"SingularName": "Angstrom",
"PluralName": "Angstroms",
+ "BaseUnits": {
+ "L": "Angstrom"
+ },
"FromUnitToBaseFunc": "{x} * 1e-10",
"FromBaseToUnitFunc": "{x} / 1e-10",
"XmlDocSummary": "Angstrom is a metric unit of length equal to 1e-10 meter",
@@ -424,6 +457,9 @@
{
"SingularName": "DataMile",
"PluralName": "DataMiles",
+ "BaseUnits": {
+ "L": "DataMile"
+ },
"FromUnitToBaseFunc": "{x} * 1828.8",
"FromBaseToUnitFunc": "{x} / 1828.8",
"XmlDocSummary": "In radar-related subjects and in JTIDS, a data mile is a unit of distance equal to 6000 feet (1.8288 kilometres or 0.987 nautical miles).",
diff --git a/Common/UnitDefinitions/LinearDensity.json b/Common/UnitDefinitions/LinearDensity.json
index 7d08f3b9a8..966badfbfb 100644
--- a/Common/UnitDefinitions/LinearDensity.json
+++ b/Common/UnitDefinitions/LinearDensity.json
@@ -11,6 +11,10 @@
{
"SingularName": "GramPerMillimeter",
"PluralName": "GramsPerMillimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Micro", "Milli", "Kilo" ],
@@ -24,6 +28,10 @@
{
"SingularName": "GramPerCentimeter",
"PluralName": "GramsPerCentimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} * 1e-1",
"FromBaseToUnitFunc": "{x} / 1e-1",
"Prefixes": [ "Micro", "Milli", "Kilo" ],
@@ -37,6 +45,10 @@
{
"SingularName": "GramPerMeter",
"PluralName": "GramsPerMeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "L": "Meter"
+ },
"FromUnitToBaseFunc": "{x} * 1e-3",
"FromBaseToUnitFunc": "{x} / 1e-3",
"Prefixes": [ "Micro", "Milli", "Kilo" ],
@@ -50,8 +62,12 @@
{
"SingularName": "PoundPerInch",
"PluralName": "PoundsPerInch",
- "FromUnitToBaseFunc": "{x} / 5.5997415e-2",
- "FromBaseToUnitFunc": "{x} * 5.5997415e-2",
+ "BaseUnits": {
+ "M": "Pound",
+ "L": "Inch"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 2.54e-2",
+ "FromBaseToUnitFunc": "{x} * 2.54e-2 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -62,8 +78,12 @@
{
"SingularName": "PoundPerFoot",
"PluralName": "PoundsPerFoot",
- "FromUnitToBaseFunc": "{x} * 1.48816394",
- "FromBaseToUnitFunc": "{x} / 1.48816394",
+ "BaseUnits": {
+ "M": "Pound",
+ "L": "Foot"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -74,6 +94,10 @@
{
"SingularName": "GramPerFoot",
"PluralName": "GramsPerFoot",
+ "BaseUnits": {
+ "M": "Gram",
+ "L": "Foot"
+ },
"FromUnitToBaseFunc": "{x} * ( 1e-3 / 0.3048 )",
"FromBaseToUnitFunc": "{x} / ( 1e-3 / 0.3048 )",
"Prefixes": [ "Micro", "Milli", "Kilo" ],
diff --git a/Common/UnitDefinitions/LinearPowerDensity.json b/Common/UnitDefinitions/LinearPowerDensity.json
index 2802ee7aa1..cc0ccfe824 100644
--- a/Common/UnitDefinitions/LinearPowerDensity.json
+++ b/Common/UnitDefinitions/LinearPowerDensity.json
@@ -12,9 +12,14 @@
{
"SingularName": "WattPerMeter",
"PluralName": "WattsPerMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
+ "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
@@ -27,7 +32,7 @@
"PluralName": "WattsPerCentimeter",
"FromUnitToBaseFunc": "{x} * 1e2",
"FromBaseToUnitFunc": "{x} / 1e2",
- "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
+ "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
@@ -35,12 +40,12 @@
}
]
},
- {
+ {
"SingularName": "WattPerMillimeter",
"PluralName": "WattsPerMillimeter",
"FromUnitToBaseFunc": "{x} * 1e3",
"FromBaseToUnitFunc": "{x} / 1e3",
- "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
+ "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
@@ -51,9 +56,9 @@
{
"SingularName": "WattPerInch",
"PluralName": "WattsPerInch",
- "FromUnitToBaseFunc": "{x} * 39.37007874",
- "FromBaseToUnitFunc": "{x} / 39.37007874",
- "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
+ "FromUnitToBaseFunc": "{x} / 2.54e-2",
+ "FromBaseToUnitFunc": "{x} * 2.54e-2",
+ "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
@@ -64,9 +69,9 @@
{
"SingularName": "WattPerFoot",
"PluralName": "WattsPerFoot",
- "FromUnitToBaseFunc": "{x} * 3.280839895",
- "FromBaseToUnitFunc": "{x} / 3.280839895",
- "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
+ "FromUnitToBaseFunc": "{x} / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048",
+ "Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Luminance.json b/Common/UnitDefinitions/Luminance.json
index adda90e9ff..0784d0047c 100644
--- a/Common/UnitDefinitions/Luminance.json
+++ b/Common/UnitDefinitions/Luminance.json
@@ -26,11 +26,11 @@
}
]
},
- {
+ {
"SingularName": "CandelaPerSquareFoot",
"PluralName": "CandelasPerSquareFoot",
- "FromUnitToBaseFunc": "{x}* 1.07639e1",
- "FromBaseToUnitFunc": "{x}/ 1.07639e1",
+ "FromUnitToBaseFunc": "{x} / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2",
"Localization": [
{
"Culture": "en-US",
@@ -38,11 +38,11 @@
}
]
},
- {
+ {
"SingularName": "CandelaPerSquareInch",
"PluralName": "CandelasPerSquareInch",
- "FromUnitToBaseFunc": "{x}* 1.5500031e3",
- "FromBaseToUnitFunc": "{x}/ 1.5500031e3",
+ "FromUnitToBaseFunc": "{x} / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Luminosity.json b/Common/UnitDefinitions/Luminosity.json
index e0caa0eab7..149b53b773 100644
--- a/Common/UnitDefinitions/Luminosity.json
+++ b/Common/UnitDefinitions/Luminosity.json
@@ -12,6 +12,11 @@
{
"SingularName": "Watt",
"PluralName": "Watts",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Femto", "Pico", "Nano", "Micro", "Milli", "Deci", "Deca", "Kilo", "Mega", "Giga", "Tera", "Peta" ],
@@ -25,9 +30,10 @@
{
"SingularName": "SolarLuminosity",
"PluralName": "SolarLuminosities",
- "FromUnitToBaseFunc": "{x} * 3.846e26",
- "FromBaseToUnitFunc": "{x} / 3.846e26",
- "XmlDocRemarks": "https://www.britannica.com/science/luminosity",
+ "XmlDocSummary": "The IAU has defined a nominal solar luminosity of 3.828×10^26 W to promote publication of consistent and comparable values in units of the solar luminosity.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Luminosity#Measurement",
+ "FromUnitToBaseFunc": "{x} * 3.828e26",
+ "FromBaseToUnitFunc": "{x} / 3.828e26",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/LuminousFlux.json b/Common/UnitDefinitions/LuminousFlux.json
index 844a6f2b69..f0d77ce38c 100644
--- a/Common/UnitDefinitions/LuminousFlux.json
+++ b/Common/UnitDefinitions/LuminousFlux.json
@@ -10,6 +10,9 @@
{
"SingularName": "Lumen",
"PluralName": "Lumens",
+ "BaseUnits": {
+ "J": "Candela"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/MagneticField.json b/Common/UnitDefinitions/MagneticField.json
index 4f356e2650..644e3c32c8 100644
--- a/Common/UnitDefinitions/MagneticField.json
+++ b/Common/UnitDefinitions/MagneticField.json
@@ -12,6 +12,11 @@
{
"SingularName": "Tesla",
"PluralName": "Teslas",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli" ],
diff --git a/Common/UnitDefinitions/MagneticFlux.json b/Common/UnitDefinitions/MagneticFlux.json
index 5307d9fad3..be32c3baf8 100644
--- a/Common/UnitDefinitions/MagneticFlux.json
+++ b/Common/UnitDefinitions/MagneticFlux.json
@@ -13,6 +13,12 @@
{
"SingularName": "Weber",
"PluralName": "Webers",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/Mass.json b/Common/UnitDefinitions/Mass.json
index 1c2cfff129..711e3c53ce 100644
--- a/Common/UnitDefinitions/Mass.json
+++ b/Common/UnitDefinitions/Mass.json
@@ -36,6 +36,8 @@
"BaseUnits": {
"M": "Tonne"
},
+ "XmlDocSummary": "The tonne is a unit of mass equal to 1,000 kilograms. It is a non-SI unit accepted for use with SI. It is also referred to as a metric ton in the United States to distinguish it from the non-metric units of the short ton (United States customary units) and the long ton (British imperial units). It is equivalent to approximately 2,204.6 pounds, 1.102 short tons, and 0.984 long tons.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Tonne",
"FromUnitToBaseFunc": "{x} * 1e3",
"FromBaseToUnitFunc": "{x} / 1e3",
"Prefixes": [ "Kilo", "Mega" ],
@@ -60,10 +62,10 @@
"BaseUnits": {
"M": "ShortTon"
},
- "FromUnitToBaseFunc": "{x} * 9.0718474e2",
- "FromBaseToUnitFunc": "{x} / 9.0718474e2",
"XmlDocSummary": "The short ton is a unit of mass equal to 2,000 pounds (907.18474 kg), that is most commonly used in the United States – known there simply as the ton.",
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Short_ton",
+ "FromUnitToBaseFunc": "{x} * 907.18474",
+ "FromBaseToUnitFunc": "{x} / 907.18474",
"Localization": [
{
"Culture": "en-US",
@@ -85,10 +87,10 @@
"BaseUnits": {
"M": "LongTon"
},
- "FromUnitToBaseFunc": "{x} * 1.0160469088e3",
- "FromBaseToUnitFunc": "{x} / 1.0160469088e3",
"XmlDocSummary": "Long ton (weight ton or Imperial ton) is a unit of mass equal to 2,240 pounds (1,016 kg) and is the name for the unit called the \"ton\" in the avoirdupois or Imperial system of measurements that was used in the United Kingdom and several other Commonwealth countries before metrication.",
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Long_ton",
+ "FromUnitToBaseFunc": "{x} * 1016.0469088",
+ "FromBaseToUnitFunc": "{x} / 1016.0469088",
"Localization": [
{
"Culture": "en-US",
@@ -110,10 +112,10 @@
"BaseUnits": {
"M": "Pound"
},
- "FromUnitToBaseFunc": "{x} * 0.45359237",
- "FromBaseToUnitFunc": "{x} / 0.45359237",
"XmlDocSummary": "The pound or pound-mass (abbreviations: lb, lbm) is a unit of mass used in the imperial, United States customary and other systems of measurement. A number of different definitions have been used, the most common today being the international avoirdupois pound which is legally defined as exactly 0.45359237 kilograms, and which is divided into 16 avoirdupois ounces.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Pound_(mass)",
+ "FromUnitToBaseFunc": "{x} * 0.45359237",
+ "FromBaseToUnitFunc": "{x} / 0.45359237",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
@@ -136,10 +138,10 @@
"BaseUnits": {
"M": "Ounce"
},
- "FromUnitToBaseFunc": "{x} * 0.028349523125",
- "FromBaseToUnitFunc": "{x} / 0.028349523125",
"XmlDocSummary": "The international avoirdupois ounce (abbreviated oz) is defined as exactly 28.349523125 g under the international yard and pound agreement of 1959, signed by the United States and countries of the Commonwealth of Nations. 16 oz make up an avoirdupois pound.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Ounce",
+ "FromUnitToBaseFunc": "{x} * 0.028349523125",
+ "FromBaseToUnitFunc": "{x} / 0.028349523125",
"Localization": [
{
"Culture": "en-US",
@@ -157,10 +159,10 @@
"BaseUnits": {
"M": "Slug"
},
- "FromUnitToBaseFunc": "{x} / 6.852176556196105e-2",
- "FromBaseToUnitFunc": "{x} * 6.852176556196105e-2",
"XmlDocSummary": "The slug (abbreviation slug) is a unit of mass that is accelerated by 1 ft/s² when a force of one pound (lbf) is exerted on it.",
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Slug_(unit)",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -174,10 +176,10 @@
"BaseUnits": {
"M": "Stone"
},
- "FromUnitToBaseFunc": "{x} / 0.1574731728702698",
- "FromBaseToUnitFunc": "{x} * 0.1574731728702698",
"XmlDocSummary": "The stone (abbreviation st) is a unit of mass equal to 14 pounds avoirdupois (about 6.35 kilograms) used in Great Britain and Ireland for measuring human body weight.",
"XmlDocRemarks": "http://en.wikipedia.org/wiki/Stone_(unit)",
+ "FromUnitToBaseFunc": "{x} * 6.35029318",
+ "FromBaseToUnitFunc": "{x} / 6.35029318",
"Localization": [
{
"Culture": "en-US",
@@ -191,10 +193,10 @@
"BaseUnits": {
"M": "ShortHundredweight"
},
- "FromUnitToBaseFunc": "{x} / 0.022046226218487758",
- "FromBaseToUnitFunc": "{x} * 0.022046226218487758",
"XmlDocSummary": "The short hundredweight (abbreviation cwt) is a unit of mass equal to 100 pounds in US and Canada. In British English, the short hundredweight is referred to as the \"cental\".",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Hundredweight",
+ "FromUnitToBaseFunc": "{x} * 45.359237",
+ "FromBaseToUnitFunc": "{x} / 45.359237",
"Localization": [
{
"Culture": "en-US",
@@ -208,10 +210,10 @@
"BaseUnits": {
"M": "LongHundredweight"
},
- "FromUnitToBaseFunc": "{x} / 0.01968413055222121",
- "FromBaseToUnitFunc": "{x} * 0.01968413055222121",
"XmlDocSummary": "The long or imperial hundredweight (abbreviation cwt) is a unit of mass equal to 112 pounds in US and Canada.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Hundredweight",
+ "FromUnitToBaseFunc": "{x} * 50.80234544",
+ "FromBaseToUnitFunc": "{x} / 50.80234544",
"Localization": [
{
"Culture": "en-US",
@@ -225,10 +227,10 @@
"BaseUnits": {
"M": "Grain"
},
- "FromUnitToBaseFunc": "{x} / 15432.358352941431",
- "FromBaseToUnitFunc": "{x} * 15432.358352941431",
"XmlDocSummary": "A grain is a unit of measurement of mass, and in the troy weight, avoirdupois, and Apothecaries' system, equal to exactly 64.79891 milligrams.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Grain_(unit)",
+ "FromUnitToBaseFunc": "{x} * 64.79891e-6",
+ "FromBaseToUnitFunc": "{x} / 64.79891e-6",
"Localization": [
{
"Culture": "en-US",
@@ -242,10 +244,10 @@
"BaseUnits": {
"M": "SolarMass"
},
- "FromUnitToBaseFunc": "{x} * 1.98947e30",
- "FromBaseToUnitFunc": "{x} / 1.98947e30",
"XmlDocSummary": "Solar mass is a ratio unit to the mass of the solar system star, the sun.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Solar_mass",
+ "FromUnitToBaseFunc": "{x} * 1.98947e30",
+ "FromBaseToUnitFunc": "{x} / 1.98947e30",
"Localization": [
{
"Culture": "en-US",
@@ -259,10 +261,10 @@
"BaseUnits": {
"M": "EarthMass"
},
- "FromUnitToBaseFunc": "{x} * 5.9722E+24",
- "FromBaseToUnitFunc": "{x} / 5.9722E+24",
"XmlDocSummary": "Earth mass is a ratio unit to the mass of planet Earth.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Earth_mass",
+ "FromUnitToBaseFunc": "{x} * 5.9722E+24",
+ "FromBaseToUnitFunc": "{x} / 5.9722E+24",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/MassConcentration.json b/Common/UnitDefinitions/MassConcentration.json
index a8f7d6097c..851e05a170 100644
--- a/Common/UnitDefinitions/MassConcentration.json
+++ b/Common/UnitDefinitions/MassConcentration.json
@@ -66,17 +66,13 @@
{
"SingularName": "GramPerMicroliter",
"PluralName": "GramsPerMicroliter",
- "BaseUnits": {
- "M": "Gram",
- "L": "Centimeter"
- },
"FromUnitToBaseFunc": "{x} / 1e-6",
"FromBaseToUnitFunc": "{x} * 1e-6",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "g/μL" ]
+ "Abbreviations": [ "g/μl" ]
}
]
},
@@ -93,7 +89,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "g/mL" ]
+ "Abbreviations": [ "g/ml" ]
}
]
},
@@ -106,7 +102,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "g/dL" ]
+ "Abbreviations": [ "g/dl" ]
}
]
},
@@ -123,7 +119,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "g/L"]
+ "Abbreviations": [ "g/l"]
}
]
},
@@ -182,8 +178,8 @@
"M": "Pound",
"L": "Inch"
},
- "FromUnitToBaseFunc": "{x} / 3.6127298147753e-5",
- "FromBaseToUnitFunc": "{x} * 3.6127298147753e-5",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5 / 0.45359237",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -200,8 +196,8 @@
"M": "Pound",
"L": "Foot"
},
- "FromUnitToBaseFunc": "{x} / 0.062427961",
- "FromBaseToUnitFunc": "{x} * 0.062427961",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592 / 0.45359237",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -218,8 +214,8 @@
"M": "Slug",
"L": "Foot"
},
- "FromUnitToBaseFunc": "{x} * 515.378818",
- "FromBaseToUnitFunc": "{x} * 0.00194032033",
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 9.80665) / (0.3048 * 0.028316846592)",
+ "FromBaseToUnitFunc": "{x} * (0.3048 * 0.028316846592) / (0.45359237 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -230,8 +226,8 @@
{
"SingularName": "PoundPerUSGallon",
"PluralName": "PoundsPerUSGallon",
- "FromUnitToBaseFunc": "{x} * 1.19826427e2",
- "FromBaseToUnitFunc": "{x} / 1.19826427e2",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.003785411784",
+ "FromBaseToUnitFunc": "{x} * 0.003785411784 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
@@ -239,11 +235,11 @@
}
]
},
- {
+ {
"SingularName": "OuncePerUSGallon",
"PluralName": "OuncesPerUSGallon",
- "FromUnitToBaseFunc": " {x} / 0.1335264711843",
- "FromBaseToUnitFunc": "{x} * 0.1335264711843",
+ "FromUnitToBaseFunc": "{x} * 0.028349523125 / 0.003785411784",
+ "FromBaseToUnitFunc": "{x} * 0.003785411784 / 0.028349523125",
"Localization": [
{
"Culture": "en-US",
@@ -251,11 +247,11 @@
}
]
},
- {
+ {
"SingularName": "OuncePerImperialGallon",
"PluralName": "OuncesPerImperialGallon",
- "FromUnitToBaseFunc": " {x} / 0.1603586720609",
- "FromBaseToUnitFunc": "{x} * 0.1603586720609",
+ "FromUnitToBaseFunc": "{x} * 0.028349523125 / 0.00454609",
+ "FromBaseToUnitFunc": "{x} * 0.00454609 / 0.028349523125",
"Localization": [
{
"Culture": "en-US",
@@ -266,8 +262,8 @@
{
"SingularName": "PoundPerImperialGallon",
"PluralName": "PoundsPerImperialGallon",
- "FromUnitToBaseFunc": "{x} * 9.9776398e1",
- "FromBaseToUnitFunc": "{x} / 9.9776398e1",
+ "FromUnitToBaseFunc": "{x} * 0.45359237 / 0.00454609",
+ "FromBaseToUnitFunc": "{x} * 0.00454609 / 0.45359237",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/MassFlow.json b/Common/UnitDefinitions/MassFlow.json
index 509abd6a53..015ce62f12 100644
--- a/Common/UnitDefinitions/MassFlow.json
+++ b/Common/UnitDefinitions/MassFlow.json
@@ -10,6 +10,10 @@
{
"SingularName": "GramPerSecond",
"PluralName": "GramsPerSecond",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo" ],
@@ -23,6 +27,10 @@
{
"SingularName": "GramPerDay",
"PluralName": "GramsPerDay",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Day"
+ },
"FromUnitToBaseFunc": "{x} / 86400",
"FromBaseToUnitFunc": "{x} * 86400",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
@@ -36,6 +44,10 @@
{
"SingularName": "GramPerHour",
"PluralName": "GramsPerHour",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
@@ -48,6 +60,10 @@
{
"SingularName": "KilogramPerHour",
"PluralName": "KilogramsPerHour",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3.6",
"FromBaseToUnitFunc": "{x} * 3.6",
"Localization": [
@@ -64,6 +80,10 @@
{
"SingularName": "KilogramPerMinute",
"PluralName": "KilogramsPerMinute",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 0.06",
"FromBaseToUnitFunc": "{x} * 0.06",
"Localization": [
@@ -80,7 +100,11 @@
{
"SingularName": "TonnePerHour",
"PluralName": "TonnesPerHour",
- "FromUnitToBaseFunc": "1000 * {x} / 3.6",
+ "BaseUnits": {
+ "M": "Tonne",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 1000 / 3.6",
"FromBaseToUnitFunc": "{x} * 3.6 / 1000",
"Localization": [
{
@@ -92,8 +116,12 @@
{
"SingularName": "PoundPerDay",
"PluralName": "PoundsPerDay",
- "FromUnitToBaseFunc": "{x} / 190.47936",
- "FromBaseToUnitFunc": "{x} * 190.47936",
+ "BaseUnits": {
+ "M": "Pound",
+ "T": "Day"
+ },
+ "FromUnitToBaseFunc": "{x} * 453.59237 / 86400",
+ "FromBaseToUnitFunc": "{x} * 86400 / 453.59237",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -105,8 +133,12 @@
{
"SingularName": "PoundPerHour",
"PluralName": "PoundsPerHour",
- "FromUnitToBaseFunc": "{x} / 7.93664",
- "FromBaseToUnitFunc": "{x} * 7.93664",
+ "BaseUnits": {
+ "M": "Pound",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 453.59237 / 3600",
+ "FromBaseToUnitFunc": "{x} * 3600 / 453.59237",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -118,8 +150,12 @@
{
"SingularName": "PoundPerMinute",
"PluralName": "PoundsPerMinute",
- "FromUnitToBaseFunc": "{x} / 0.132277",
- "FromBaseToUnitFunc": "{x} * 0.132277",
+ "BaseUnits": {
+ "M": "Pound",
+ "T": "Minute"
+ },
+ "FromUnitToBaseFunc": "{x} * 453.59237 / 60",
+ "FromBaseToUnitFunc": "{x} * 60 / 453.59237",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -131,6 +167,10 @@
{
"SingularName": "PoundPerSecond",
"PluralName": "PoundsPerSecond",
+ "BaseUnits": {
+ "M": "Pound",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x} * 453.59237",
"FromBaseToUnitFunc": "{x} / 453.59237",
"Prefixes": [ "Mega" ],
@@ -144,6 +184,10 @@
{
"SingularName": "TonnePerDay",
"PluralName": "TonnesPerDay",
+ "BaseUnits": {
+ "M": "Tonne",
+ "T": "Day"
+ },
"FromUnitToBaseFunc": "{x} / 0.0864000",
"FromBaseToUnitFunc": "{x} * 0.0864000",
"Localization": [
@@ -156,8 +200,12 @@
{
"SingularName": "ShortTonPerHour",
"PluralName": "ShortTonsPerHour",
- "FromUnitToBaseFunc": "{x} * 251.9957611",
- "FromBaseToUnitFunc": "{x} / 251.9957611",
+ "BaseUnits": {
+ "M": "ShortTon",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 907.18474 / 3.6",
+ "FromBaseToUnitFunc": "{x} * 3.6 / 907.18474",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/MassFlux.json b/Common/UnitDefinitions/MassFlux.json
index fe66af7430..c3bcc9bdc0 100644
--- a/Common/UnitDefinitions/MassFlux.json
+++ b/Common/UnitDefinitions/MassFlux.json
@@ -11,6 +11,11 @@
{
"SingularName": "GramPerSecondPerSquareMeter",
"PluralName": "GramsPerSecondPerSquareMeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Second",
+ "L": "Meter"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Prefixes": [ "Kilo" ],
@@ -24,6 +29,11 @@
{
"SingularName": "GramPerSecondPerSquareCentimeter",
"PluralName": "GramsPerSecondPerSquareCentimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Second",
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e-1",
"FromBaseToUnitFunc": "{x} * 1e-1",
"Prefixes": [ "Kilo" ],
@@ -37,6 +47,11 @@
{
"SingularName": "GramPerSecondPerSquareMillimeter",
"PluralName": "GramsPerSecondPerSquareMillimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Second",
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e-3",
"FromBaseToUnitFunc": "{x} * 1e-3",
"Prefixes": [ "Kilo" ],
@@ -50,6 +65,11 @@
{
"SingularName": "GramPerHourPerSquareMeter",
"PluralName": "GramsPerHourPerSquareMeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Hour",
+ "L": "Meter"
+ },
"FromUnitToBaseFunc": "{x} / 3.6e6",
"FromBaseToUnitFunc": "{x} * 3.6e6",
"Prefixes": [ "Kilo" ],
@@ -63,6 +83,11 @@
{
"SingularName": "GramPerHourPerSquareCentimeter",
"PluralName": "GramsPerHourPerSquareCentimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Hour",
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} / 3.6e2",
"FromBaseToUnitFunc": "{x} * 3.6e2",
"Prefixes": [ "Kilo" ],
@@ -76,6 +101,11 @@
{
"SingularName": "GramPerHourPerSquareMillimeter",
"PluralName": "GramsPerHourPerSquareMillimeter",
+ "BaseUnits": {
+ "M": "Gram",
+ "T": "Hour",
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x} / 3.6e0",
"FromBaseToUnitFunc": "{x} * 3.6e0",
"Prefixes": [ "Kilo" ],
diff --git a/Common/UnitDefinitions/MassMomentOfInertia.json b/Common/UnitDefinitions/MassMomentOfInertia.json
index 87f7a4ee11..bacf328d60 100644
--- a/Common/UnitDefinitions/MassMomentOfInertia.json
+++ b/Common/UnitDefinitions/MassMomentOfInertia.json
@@ -10,6 +10,10 @@
{
"SingularName": "GramSquareMeter",
"PluralName": "GramSquareMeters",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Prefixes": [ "Milli", "Kilo" ],
@@ -23,6 +27,10 @@
{
"SingularName": "GramSquareDecimeter",
"PluralName": "GramSquareDecimeters",
+ "BaseUnits": {
+ "L": "Decimeter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1e5",
"FromBaseToUnitFunc": "{x} * 1e5",
"Prefixes": [ "Milli", "Kilo" ],
@@ -36,6 +44,10 @@
{
"SingularName": "GramSquareCentimeter",
"PluralName": "GramSquareCentimeters",
+ "BaseUnits": {
+ "L": "Centimeter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1e7",
"FromBaseToUnitFunc": "{x} * 1e7",
"Prefixes": [ "Milli", "Kilo" ],
@@ -49,6 +61,10 @@
{
"SingularName": "GramSquareMillimeter",
"PluralName": "GramSquareMillimeters",
+ "BaseUnits": {
+ "L": "Millimeter",
+ "M": "Gram"
+ },
"FromUnitToBaseFunc": "{x} / 1e9",
"FromBaseToUnitFunc": "{x} * 1e9",
"Prefixes": [ "Milli", "Kilo" ],
@@ -62,6 +78,10 @@
{
"SingularName": "TonneSquareMeter",
"PluralName": "TonneSquareMeters",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Tonne"
+ },
"FromUnitToBaseFunc": "{x} / 1e-3",
"FromBaseToUnitFunc": "{x} * 1e-3",
"Prefixes": [ "Kilo", "Mega" ],
@@ -75,6 +95,10 @@
{
"SingularName": "TonneSquareDecimeter",
"PluralName": "TonneSquareDecimeters",
+ "BaseUnits": {
+ "L": "Decimeter",
+ "M": "Tonne"
+ },
"FromUnitToBaseFunc": "{x} / 1e-1",
"FromBaseToUnitFunc": "{x} * 1e-1",
"Prefixes": [ "Kilo", "Mega" ],
@@ -88,6 +112,10 @@
{
"SingularName": "TonneSquareCentimeter",
"PluralName": "TonneSquareCentimeters",
+ "BaseUnits": {
+ "L": "Centimeter",
+ "M": "Tonne"
+ },
"FromUnitToBaseFunc": "{x} / 1e1",
"FromBaseToUnitFunc": "{x} * 1e1",
"Prefixes": [ "Kilo", "Mega" ],
@@ -99,8 +127,12 @@
]
},
{
- "SingularName": "TonneSquareMilimeter",
- "PluralName": "TonneSquareMilimeters",
+ "SingularName": "TonneSquareMillimeter",
+ "PluralName": "TonneSquareMillimeters",
+ "BaseUnits": {
+ "L": "Millimeter",
+ "M": "Tonne"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Prefixes": [ "Kilo", "Mega" ],
@@ -114,8 +146,12 @@
{
"SingularName": "PoundSquareFoot",
"PluralName": "PoundSquareFeet",
- "FromUnitToBaseFunc": "{x} * 4.21401101e-2",
- "FromBaseToUnitFunc": "{x} / 4.21401101e-2",
+ "BaseUnits": {
+ "L": "Foot",
+ "M": "Pound"
+ },
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 9.290304e-2)",
+ "FromBaseToUnitFunc": "{x} / (0.45359237 * 9.290304e-2)",
"Localization": [
{
"Culture": "en-US",
@@ -126,8 +162,12 @@
{
"SingularName": "PoundSquareInch",
"PluralName": "PoundSquareInches",
- "FromUnitToBaseFunc": "{x} * 2.9263965e-4",
- "FromBaseToUnitFunc": "{x} / 2.9263965e-4",
+ "BaseUnits": {
+ "L": "Inch",
+ "M": "Pound"
+ },
+ "FromUnitToBaseFunc": "{x} * (0.45359237 * 0.00064516)",
+ "FromBaseToUnitFunc": "{x} / (0.45359237 * 0.00064516)",
"Localization": [
{
"Culture": "en-US",
@@ -138,8 +178,12 @@
{
"SingularName": "SlugSquareFoot",
"PluralName": "SlugSquareFeet",
- "FromUnitToBaseFunc": "{x} * 1.3558179619",
- "FromBaseToUnitFunc": "{x} / 1.3558179619",
+ "BaseUnits": {
+ "L": "Foot",
+ "M": "Slug"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.45359237 * 9.290304e-2 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237 * 9.290304e-2 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -150,8 +194,12 @@
{
"SingularName": "SlugSquareInch",
"PluralName": "SlugSquareInches",
- "FromUnitToBaseFunc": "{x} * 9.41540242e-3",
- "FromBaseToUnitFunc": "{x} / 9.41540242e-3",
+ "BaseUnits": {
+ "L": "Inch",
+ "M": "Slug"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.45359237 * 0.00064516 * 9.80665 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / (0.45359237 * 0.00064516 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/MolarEnergy.json b/Common/UnitDefinitions/MolarEnergy.json
index 93add4f13e..2855d507d8 100644
--- a/Common/UnitDefinitions/MolarEnergy.json
+++ b/Common/UnitDefinitions/MolarEnergy.json
@@ -12,6 +12,12 @@
{
"SingularName": "JoulePerMole",
"PluralName": "JoulesPerMole",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "N": "Mole"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/MolarEntropy.json b/Common/UnitDefinitions/MolarEntropy.json
index 5179ead524..96032caed6 100644
--- a/Common/UnitDefinitions/MolarEntropy.json
+++ b/Common/UnitDefinitions/MolarEntropy.json
@@ -13,6 +13,13 @@
{
"SingularName": "JoulePerMoleKelvin",
"PluralName": "JoulesPerMoleKelvin",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "Kelvin",
+ "N": "Mole"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/MolarMass.json b/Common/UnitDefinitions/MolarMass.json
index 36401297c6..edcda34e72 100644
--- a/Common/UnitDefinitions/MolarMass.json
+++ b/Common/UnitDefinitions/MolarMass.json
@@ -10,6 +10,10 @@
{
"SingularName": "GramPerMole",
"PluralName": "GramsPerMole",
+ "BaseUnits": {
+ "M": "Gram",
+ "N": "Mole"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo" ],
@@ -27,6 +31,10 @@
{
"SingularName": "KilogramPerKilomole",
"PluralName": "KilogramsPerKilomole",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "N": "Kilomole"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Localization": [
@@ -39,6 +47,10 @@
{
"SingularName": "PoundPerMole",
"PluralName": "PoundsPerMole",
+ "BaseUnits": {
+ "M": "Pound",
+ "N": "Mole"
+ },
"FromUnitToBaseFunc": "{x} * 0.45359237",
"FromBaseToUnitFunc": "{x} / 0.45359237",
"Prefixes": [ "Kilo", "Mega" ],
diff --git a/Common/UnitDefinitions/Molarity.json b/Common/UnitDefinitions/Molarity.json
index 81a0c605dc..0c2471845f 100644
--- a/Common/UnitDefinitions/Molarity.json
+++ b/Common/UnitDefinitions/Molarity.json
@@ -38,7 +38,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "mol/L", "M" ]
+ "Abbreviations": [ "mol/l", "M" ]
}
]
},
@@ -49,8 +49,8 @@
"L": "Foot",
"N": "PoundMole"
},
- "FromUnitToBaseFunc": "{x} / 6.2427960576144611956325455827221e-5",
- "FromBaseToUnitFunc": "{x} * 6.2427960576144611956325455827221e-5",
+ "FromUnitToBaseFunc": "{x} * 1000 * 0.45359237 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} / (1000 * 0.45359237 / 0.028316846592)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Permeability.json b/Common/UnitDefinitions/Permeability.json
index cb6c794fe4..3984be7463 100644
--- a/Common/UnitDefinitions/Permeability.json
+++ b/Common/UnitDefinitions/Permeability.json
@@ -13,6 +13,12 @@
{
"SingularName": "HenryPerMeter",
"PluralName": "HenriesPerMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/Permittivity.json b/Common/UnitDefinitions/Permittivity.json
index ebdd6232f1..7ac18b96f6 100644
--- a/Common/UnitDefinitions/Permittivity.json
+++ b/Common/UnitDefinitions/Permittivity.json
@@ -13,6 +13,12 @@
{
"SingularName": "FaradPerMeter",
"PluralName": "FaradsPerMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "I": "Ampere"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/PorousMediumPermeability.json b/Common/UnitDefinitions/PorousMediumPermeability.json
index 5f6a0f78ae..746e8805ab 100644
--- a/Common/UnitDefinitions/PorousMediumPermeability.json
+++ b/Common/UnitDefinitions/PorousMediumPermeability.json
@@ -10,6 +10,8 @@
{
"SingularName": "Darcy",
"PluralName": "Darcys",
+ "XmlDocSummary": "The darcy (or darcy unit) and millidarcy (md or mD) are units of permeability, named after Henry Darcy. They are not SI units, but they are widely used in petroleum engineering and geology.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Darcy_(unit)",
"FromUnitToBaseFunc": "{x} * 9.869233e-13",
"FromBaseToUnitFunc": "{x} / 9.869233e-13",
"Prefixes": [ "Micro", "Milli" ],
diff --git a/Common/UnitDefinitions/Power.json b/Common/UnitDefinitions/Power.json
index 0db3f6ea48..c850f494f2 100644
--- a/Common/UnitDefinitions/Power.json
+++ b/Common/UnitDefinitions/Power.json
@@ -1,7 +1,6 @@
{
"Name": "Power",
"BaseUnit": "Watt",
- "ValueType": "decimal",
"XmlDocSummary": "In physics, power is the rate of doing work. It is equivalent to an amount of energy consumed per unit time.",
"BaseDimensions": {
"L": 2,
@@ -30,8 +29,10 @@
{
"SingularName": "MechanicalHorsepower",
"PluralName": "MechanicalHorsepower",
- "FromUnitToBaseFunc": "{x} * 745.69m",
- "FromBaseToUnitFunc": "{x} / 745.69m",
+ "XmlDocSummary": "Assuming the third CGPM (1901, CR 70) definition of standard gravity, gn = 9.80665 m/s2, is used to define the pound-force as well as the kilogram force, and the international avoirdupois pound (1959), one imperial horsepower is: 76.0402249 × 9.80665 kg⋅m2/s3",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower#Imperial_horsepower",
+ "FromUnitToBaseFunc": "{x} * 76.0402249 * 9.80665",
+ "FromBaseToUnitFunc": "{x} / (76.0402249 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -42,8 +43,10 @@
{
"SingularName": "MetricHorsepower",
"PluralName": "MetricHorsepower",
- "FromUnitToBaseFunc": "{x} * 735.49875m",
- "FromBaseToUnitFunc": "{x} / 735.49875m",
+ "XmlDocSummary": "DIN 66036 defines one metric horsepower as the power to raise a mass of 75 kilograms against the Earth's gravitational force over a distance of one metre in one second:[18] 75 kg × 9.80665 m/s2 × 1 m / 1 s = 75 kgf⋅m/s = 1 PS. This is equivalent to 735.49875 W, or 98.6% of an imperial horsepower.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower#Metric_horsepower_(PS,_KM,_cv,_hk,_pk,_k,_ks,_ch)",
+ "FromUnitToBaseFunc": "{x} * 75 * 9.80665",
+ "FromBaseToUnitFunc": "{x} / (75 * 9.80665)",
"Localization": [
{
"Culture": "en-US",
@@ -54,8 +57,10 @@
{
"SingularName": "ElectricalHorsepower",
"PluralName": "ElectricalHorsepower",
- "FromUnitToBaseFunc": "{x} * 746m",
- "FromBaseToUnitFunc": "{x} / 746m",
+ "XmlDocSummary": "Nameplates on electrical motors show their power output, not the power input (the power delivered at the shaft, not the power consumed to drive the motor). This power output is ordinarily stated in watts or kilowatts. In the United States, the power output is stated in horsepower, which for this purpose is defined as exactly 746 W.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower#Electrical_horsepower",
+ "FromUnitToBaseFunc": "{x} * 746",
+ "FromBaseToUnitFunc": "{x} / 746",
"Localization": [
{
"Culture": "en-US",
@@ -66,8 +71,10 @@
{
"SingularName": "BoilerHorsepower",
"PluralName": "BoilerHorsepower",
- "FromUnitToBaseFunc": "{x} * 9812.5m",
- "FromBaseToUnitFunc": "{x} / 9812.5m",
+ "XmlDocSummary": "Boiler horsepower is a boiler's capacity to deliver steam to a steam engine and is not the same unit of power as the 550 ft lb/s definition. One boiler horsepower is equal to the thermal energy rate required to evaporate 34.5 pounds (15.6 kg) of fresh water at 212 °F (100 °C) in one hour.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower#Boiler_horsepower",
+ "FromUnitToBaseFunc": "{x} * 9812.5",
+ "FromBaseToUnitFunc": "{x} / 9812.5",
"Localization": [
{
"Culture": "en-US",
@@ -78,8 +85,10 @@
{
"SingularName": "HydraulicHorsepower",
"PluralName": "HydraulicHorsepower",
- "FromUnitToBaseFunc": "{x} * 745.69988145m",
- "FromBaseToUnitFunc": "{x} / 745.69988145m",
+ "XmlDocSummary": "Hydraulic horsepower can represent the power available within hydraulic machinery, power through the down-hole nozzle of a drilling rig, or can be used to estimate the mechanical power needed to generate a known hydraulic flow rate.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Horsepower#Hydraulic_horsepower",
+ "FromUnitToBaseFunc": "{x} * 745.69987158227022",
+ "FromBaseToUnitFunc": "{x} / 745.69987158227022",
"Localization": [
{
"Culture": "en-US",
@@ -90,8 +99,9 @@
{
"SingularName": "BritishThermalUnitPerHour",
"PluralName": "BritishThermalUnitsPerHour",
- "FromUnitToBaseFunc": "{x} * 0.29307107017m",
- "FromBaseToUnitFunc": "{x} / 0.29307107017m",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / 3600",
+ "FromBaseToUnitFunc": "{x} * 3600 / 1055.05585262",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
@@ -103,8 +113,8 @@
{
"SingularName": "JoulePerHour",
"PluralName": "JoulesPerHour",
- "FromUnitToBaseFunc": "{x} / 3600m",
- "FromBaseToUnitFunc": "{x} * 3600m",
+ "FromUnitToBaseFunc": "{x} / 3600",
+ "FromBaseToUnitFunc": "{x} * 3600",
"Prefixes": [ "Milli", "Kilo", "Mega", "Giga" ],
"Localization": [
{
@@ -116,8 +126,8 @@
{
"SingularName": "TonOfRefrigeration",
"PluralName": "TonsOfRefrigeration",
- "FromUnitToBaseFunc": "{x} * 3516.853m",
- "FromBaseToUnitFunc": "{x} / 3516.853m",
+ "FromUnitToBaseFunc": "{x} * 3516.853",
+ "FromBaseToUnitFunc": "{x} / 3516.853",
"Prefixes": [ ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/PowerDensity.json b/Common/UnitDefinitions/PowerDensity.json
index 0318d9cd42..8a4d3fa962 100644
--- a/Common/UnitDefinitions/PowerDensity.json
+++ b/Common/UnitDefinitions/PowerDensity.json
@@ -29,8 +29,8 @@
{
"SingularName": "WattPerCubicInch",
"PluralName": "WattsPerCubicInch",
- "FromUnitToBaseFunc": "{x} * 6.102374409473228e4",
- "FromBaseToUnitFunc": "{x} / 6.102374409473228e4",
+ "FromUnitToBaseFunc": "{x} / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Deci", "Deca", "Kilo", "Mega", "Giga", "Tera" ],
"Localization": [
{
@@ -42,8 +42,8 @@
{
"SingularName": "WattPerCubicFoot",
"PluralName": "WattsPerCubicFoot",
- "FromUnitToBaseFunc": "{x} * 3.531466672148859e1",
- "FromBaseToUnitFunc": "{x} / 3.531466672148859e1",
+ "FromUnitToBaseFunc": "{x} / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Deci", "Deca", "Kilo", "Mega", "Giga", "Tera" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/Pressure.json b/Common/UnitDefinitions/Pressure.json
index 663b8007fe..b93674197f 100644
--- a/Common/UnitDefinitions/Pressure.json
+++ b/Common/UnitDefinitions/Pressure.json
@@ -33,6 +33,8 @@
{
"SingularName": "Atmosphere",
"PluralName": "Atmospheres",
+ "XmlDocSummary": "The standard atmosphere (symbol: atm) is a unit of pressure defined as 101325 Pa. It is sometimes used as a reference pressure or standard pressure. It is approximately equal to Earth's average atmospheric pressure at sea level.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)",
"FromUnitToBaseFunc": "{x} * 1.01325 * 1e5",
"FromBaseToUnitFunc": "{x} / (1.01325 * 1e5)",
"Localization": [
@@ -49,6 +51,8 @@
{
"SingularName": "Bar",
"PluralName": "Bars",
+ "XmlDocSummary": "The bar is a metric unit of pressure defined as 100,000 Pa (100 kPa), though not part of the International System of Units (SI). A pressure of 1 bar is slightly less than the current average atmospheric pressure on Earth at sea level (approximately 1.013 bar).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Bar_(unit)",
"FromUnitToBaseFunc": "{x} * 1e5",
"FromBaseToUnitFunc": "{x} / 1e5",
"Prefixes": [ "Micro", "Milli", "Centi", "Deci", "Kilo", "Mega" ],
@@ -66,8 +70,8 @@
{
"SingularName": "KilogramForcePerSquareMeter",
"PluralName": "KilogramsForcePerSquareMeter",
- "FromUnitToBaseFunc": "{x} * 9.80665019960652",
- "FromBaseToUnitFunc": "{x} * 0.101971619222242",
+ "FromUnitToBaseFunc": "{x} * 9.80665",
+ "FromBaseToUnitFunc": "{x} / 9.80665",
"Localization": [
{
"Culture": "en-US",
@@ -82,11 +86,8 @@
{
"SingularName": "KilogramForcePerSquareCentimeter",
"PluralName": "KilogramsForcePerSquareCentimeter",
- "BaseUnits": {
- "L": "Centimeter",
- "M": "Kilogram",
- "T": "Second"
- },
+ "XmlDocSummary": "A kilogram-force per centimetre square (kgf/cm2), often just kilogram per square centimetre (kg/cm2), or kilopond per centimetre square (kp/cm2) is a deprecated unit of pressure using metric units. It is not a part of the International System of Units (SI), the modern metric system. 1 kgf/cm2 equals 98.0665 kPa (kilopascals). It is also known as a technical atmosphere (symbol: at).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Kilogram-force_per_square_centimetre",
"FromUnitToBaseFunc": "{x} * 9.80665e4",
"FromBaseToUnitFunc": "{x} / 9.80665e4",
"Localization": [
@@ -119,6 +120,11 @@
{
"SingularName": "NewtonPerSquareMeter",
"PluralName": "NewtonsPerSquareMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -170,8 +176,10 @@
{
"SingularName": "TechnicalAtmosphere",
"PluralName": "TechnicalAtmospheres",
- "FromUnitToBaseFunc": "{x} * 9.80680592331 * 1e4",
- "FromBaseToUnitFunc": "{x} / (9.80680592331 * 1e4)",
+ "XmlDocSummary": "A kilogram-force per centimetre square (kgf/cm2), often just kilogram per square centimetre (kg/cm2), or kilopond per centimetre square (kp/cm2) is a deprecated unit of pressure using metric units. It is not a part of the International System of Units (SI), the modern metric system. 1 kgf/cm2 equals 98.0665 kPa (kilopascals). It is also known as a technical atmosphere (symbol: at).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Kilogram-force_per_square_centimetre",
+ "FromUnitToBaseFunc": "{x} * 9.80665e4",
+ "FromBaseToUnitFunc": "{x} / 9.80665e4",
"Localization": [
{
"Culture": "en-US",
@@ -186,8 +194,10 @@
{
"SingularName": "Torr",
"PluralName": "Torrs",
- "FromUnitToBaseFunc": "{x} * 1.3332266752 * 1e2",
- "FromBaseToUnitFunc": "{x} / (1.3332266752 * 1e2)",
+ "XmlDocSummary": "The torr (symbol: Torr) is a unit of pressure based on an absolute scale, defined as exactly 1/760 of a standard atmosphere (101325 Pa). Thus one torr is exactly 101325/760 pascals (≈ 133.32 Pa).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Torr",
+ "FromUnitToBaseFunc": "{x} * 101325 / 760",
+ "FromBaseToUnitFunc": "{x} * 760 / 101325",
"Localization": [
{
"Culture": "en-US",
@@ -202,13 +212,8 @@
{
"SingularName": "PoundForcePerSquareInch",
"PluralName": "PoundsForcePerSquareInch",
- "BaseUnits": {
- "L": "Inch",
- "M": "Pound",
- "T": "Second"
- },
- "FromUnitToBaseFunc": "{x} * 6.894757293168361e3",
- "FromBaseToUnitFunc": "{x} / 6.894757293168361e3",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516 / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -226,13 +231,8 @@
{
"SingularName": "PoundForcePerSquareMil",
"PluralName": "PoundsForcePerSquareMil",
- "BaseUnits": {
- "L": "Mil",
- "M": "Pound",
- "T": "Second"
- },
- "FromUnitToBaseFunc": "{x} * 6.894757293168361e9",
- "FromBaseToUnitFunc": "{x} / 6.894757293168361e9",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / (2.54e-5 * 2.54e-5)",
+ "FromBaseToUnitFunc": "{x} * (2.54e-5 * 2.54e-5) / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -245,13 +245,8 @@
{
"SingularName": "PoundForcePerSquareFoot",
"PluralName": "PoundsForcePerSquareFoot",
- "BaseUnits": {
- "L": "Foot",
- "M": "Pound",
- "T": "Second"
- },
- "FromUnitToBaseFunc": "{x} * 4.788025898033584e1",
- "FromBaseToUnitFunc": "{x} / 4.788025898033584e1",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2 / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -264,11 +259,6 @@
{
"SingularName": "TonneForcePerSquareMillimeter",
"PluralName": "TonnesForcePerSquareMillimeter",
- "BaseUnits": {
- "L": "Millimeter",
- "M": "Tonne",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 9.80665e9",
"FromBaseToUnitFunc": "{x} / 9.80665e9",
"Localization": [
@@ -281,11 +271,6 @@
{
"SingularName": "TonneForcePerSquareMeter",
"PluralName": "TonnesForcePerSquareMeter",
- "BaseUnits": {
- "L": "Meter",
- "M": "Tonne",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 9.80665e3",
"FromBaseToUnitFunc": "{x} / 9.80665e3",
"Localization": [
@@ -299,7 +284,7 @@
"SingularName": "MeterOfHead",
"PluralName": "MetersOfHead",
"FromUnitToBaseFunc": "{x} * 9804.139432",
- "FromBaseToUnitFunc": "{x} * 0.0001019977334",
+ "FromBaseToUnitFunc": "{x} / 9804.139432",
"Localization": [
{
"Culture": "en-US",
@@ -310,11 +295,6 @@
{
"SingularName": "TonneForcePerSquareCentimeter",
"PluralName": "TonnesForcePerSquareCentimeter",
- "BaseUnits": {
- "L": "Centimeter",
- "M": "Tonne",
- "T": "Second"
- },
"FromUnitToBaseFunc": "{x} * 9.80665e7",
"FromBaseToUnitFunc": "{x} / 9.80665e7",
"Localization": [
@@ -327,8 +307,8 @@
{
"SingularName": "FootOfHead",
"PluralName": "FeetOfHead",
- "FromUnitToBaseFunc": "{x} * 2989.0669",
- "FromBaseToUnitFunc": "{x} * 0.000334552565551",
+ "FromUnitToBaseFunc": "{x} * 9804.139432 * 0.3048",
+ "FromBaseToUnitFunc": "{x} / (9804.139432 * 0.3048)",
"Localization": [
{
"Culture": "en-US",
@@ -339,8 +319,10 @@
{
"SingularName": "MillimeterOfMercury",
"PluralName": "MillimetersOfMercury",
- "FromUnitToBaseFunc": "{x} / 7.50061561302643e-3",
- "FromBaseToUnitFunc": "{x} * 7.50061561302643e-3",
+ "XmlDocSummary": "A millimetre of mercury is a manometric unit of pressure, formerly defined as the extra pressure generated by a column of mercury one millimetre high, and currently defined as exactly 133.322387415 pascals.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Millimetre_of_mercury",
+ "FromUnitToBaseFunc": "{x} * 133.322387415",
+ "FromBaseToUnitFunc": "{x} / 133.322387415",
"Localization": [
{
"Culture": "en-US",
@@ -355,8 +337,10 @@
{
"SingularName": "InchOfMercury",
"PluralName": "InchesOfMercury",
- "FromUnitToBaseFunc": "{x} / 2.95299830714159e-4",
- "FromBaseToUnitFunc": "{x} * 2.95299830714159e-4",
+ "XmlDocSummary": "Inch of mercury (inHg and ″Hg) is a non-SI unit of measurement for pressure. It is used for barometric pressure in weather reports, refrigeration and aviation in the United States. It is the pressure exerted by a column of mercury 1 inch (25.4 mm) in height at the standard acceleration of gravity.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Inch_of_mercury",
+ "FromUnitToBaseFunc": "{x} * 2.54e1 * 133.322387415",
+ "FromBaseToUnitFunc": "{x} / (2.54e1 * 133.322387415)",
"Localization": [
{
"Culture": "en-US",
@@ -379,8 +363,8 @@
{
"SingularName": "PoundPerInchSecondSquared",
"PluralName": "PoundsPerInchSecondSquared",
- "FromUnitToBaseFunc": "{x} * 1.785796732283465e1",
- "FromBaseToUnitFunc": "{x} / 1.785796732283465e1",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605 / 0.00064516) / 386.0886",
+ "FromBaseToUnitFunc": "{x} * 386.0886 / (4.4482216152605 / 0.00064516)",
"Localization": [
{
"Culture": "en-US",
@@ -391,8 +375,10 @@
{
"SingularName": "MeterOfWaterColumn",
"PluralName": "MetersOfWaterColumn",
- "FromUnitToBaseFunc": "{x} * 9.806650000000272e3",
- "FromBaseToUnitFunc": "{x} / 9.806650000000272e3",
+ "XmlDocSummary": "A centimetre of water is defined as the pressure exerted by a column of water of 1 cm in height at 4 °C (temperature of maximum density) at the standard acceleration of gravity, so that 1 cmH2O (4°C) = 999.9720 kg/m3 × 9.80665 m/s2 × 1 cm = 98.063754138 Pa, but conventionally a nominal maximum water density of 1000 kg/m3 is used, giving 98.0665 Pa.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Centimetre_or_millimetre_of_water",
+ "FromUnitToBaseFunc": "{x} * 9.80665e3",
+ "FromBaseToUnitFunc": "{x} / 9.80665e3",
"Prefixes": [ "Milli", "Centi" ],
"Localization": [
{
@@ -404,38 +390,16 @@
{
"SingularName": "InchOfWaterColumn",
"PluralName": "InchesOfWaterColumn",
- "FromUnitToBaseFunc": "{x} * 249.08890833333",
- "FromBaseToUnitFunc": "{x} / 249.08890833333",
+ "XmlDocSummary": "Inches of water is a non-SI unit for pressure. It is defined as the pressure exerted by a column of water of 1 inch in height at defined conditions. At a temperature of 4 °C (39.2 °F) pure water has its highest density (1000 kg/m3). At that temperature and assuming the standard acceleration of gravity, 1 inAq is approximately 249.082 pascals (0.0361263 psi).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Inch_of_water",
+ "FromUnitToBaseFunc": "{x} * 2.54e-2 * 9.80665e3",
+ "FromBaseToUnitFunc": "{x} / (2.54e-2 * 9.80665e3)",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "inH2O", "inch wc", "wc" ]
}
]
- },
- {
- "SingularName": "MeterOfElevation",
- "PluralName": "MetersOfElevation",
- "FromUnitToBaseFunc": "Math.Pow(1.0 - ({x} / 44307.69396), 5.2553026003237266401799415610351) * 101325.0",
- "FromBaseToUnitFunc": "(1.0 - Math.Pow({x} / 101325.0, 0.190284)) * 44307.69396",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "m of elevation" ]
- }
- ]
- },
- {
- "SingularName": "FootOfElevation",
- "PluralName": "FeetOfElevation",
- "FromUnitToBaseFunc": "Math.Pow(1.0 - ({x} / 145366.45), 5.2553026003237266401799415610351) * 101325.0",
- "FromBaseToUnitFunc": "(1.0 - Math.Pow({x} / 101325.0, 0.190284)) * 145366.45",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "ft of elevation" ]
- }
- ]
}
]
}
diff --git a/Common/UnitDefinitions/PressureChangeRate.json b/Common/UnitDefinitions/PressureChangeRate.json
index c10ba8f7fe..81de2bce94 100644
--- a/Common/UnitDefinitions/PressureChangeRate.json
+++ b/Common/UnitDefinitions/PressureChangeRate.json
@@ -55,8 +55,8 @@
{
"SingularName": "MillimeterOfMercuryPerSecond",
"PluralName": "MillimetersOfMercuryPerSecond",
- "FromUnitToBaseFunc": "{x} * 133.322",
- "FromBaseToUnitFunc": "{x} / 133.322",
+ "FromUnitToBaseFunc": "{x} * 133.322387415",
+ "FromBaseToUnitFunc": "{x} / 133.322387415",
"Localization": [
{
"Culture": "en-US",
@@ -92,8 +92,8 @@
"M": "Pound",
"T": "Second"
},
- "FromUnitToBaseFunc": "{x} * 6.894757293168361e3",
- "FromBaseToUnitFunc": "{x} / 6.894757293168361e3",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.00064516",
+ "FromBaseToUnitFunc": "{x} * 0.00064516 / 4.4482216152605",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
@@ -116,8 +116,8 @@
"M": "Pound",
"T": "Minute"
},
- "FromUnitToBaseFunc": "{x} * 6.894757293168361e3 / 60",
- "FromBaseToUnitFunc": "{x} / 6.894757293168361e3 * 60",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605 / 0.00064516) / 60",
+ "FromBaseToUnitFunc": "{x} * 60 / (4.4482216152605 / 0.00064516)",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/RadiationEquivalentDoseRate.json b/Common/UnitDefinitions/RadiationEquivalentDoseRate.json
index e33d3bae8e..8057849e78 100644
--- a/Common/UnitDefinitions/RadiationEquivalentDoseRate.json
+++ b/Common/UnitDefinitions/RadiationEquivalentDoseRate.json
@@ -28,6 +28,10 @@
{
"SingularName": "SievertPerSecond",
"PluralName": "SievertsPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli" ],
diff --git a/Common/UnitDefinitions/RatioChangeRate.json b/Common/UnitDefinitions/RatioChangeRate.json
index be72a57bde..572c51513a 100644
--- a/Common/UnitDefinitions/RatioChangeRate.json
+++ b/Common/UnitDefinitions/RatioChangeRate.json
@@ -2,7 +2,9 @@
"Name": "RatioChangeRate",
"BaseUnit": "DecimalFractionPerSecond",
"XmlDocSummary": "The change in ratio per unit of time.",
- "BaseDimensions": { "T": -1 },
+ "BaseDimensions": {
+ "T": -1
+ },
"Units": [
{
"SingularName": "PercentPerSecond",
@@ -19,6 +21,9 @@
{
"SingularName": "DecimalFractionPerSecond",
"PluralName": "DecimalFractionsPerSecond",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/ReactiveEnergy.json b/Common/UnitDefinitions/ReactiveEnergy.json
deleted file mode 100644
index 89a648ccc9..0000000000
--- a/Common/UnitDefinitions/ReactiveEnergy.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "Name": "ReactiveEnergy",
- "BaseUnit": "VoltampereReactiveHour",
- "XmlDocSummary": "The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.",
- "XmlDocRemarks": "ReactiveEnergy has been renamed to ElectricReactiveEnergy , and will be removed in a later major version.",
- "ObsoleteText": "ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.",
- "BaseDimensions": {
- "L": 2,
- "M": 1,
- "T": -2
- },
- "Units": [
- {
- "SingularName": "VoltampereReactiveHour",
- "PluralName": "VoltampereReactiveHours",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "varh" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/ReactivePower.json b/Common/UnitDefinitions/ReactivePower.json
deleted file mode 100644
index 48a84dd22d..0000000000
--- a/Common/UnitDefinitions/ReactivePower.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "Name": "ReactivePower",
- "BaseUnit": "VoltampereReactive",
- "XmlDocSummary": "Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase.",
- "XmlDocRemarks": "ReactivePower has been renamed to ElectricReactivePower , and will be removed in a later major version.",
- "ObsoleteText": "ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.",
- "BaseDimensions": {
- "L": 2,
- "M": 1,
- "T": -3
- },
- "Units": [
- {
- "SingularName": "VoltampereReactive",
- "PluralName": "VoltamperesReactive",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Kilo", "Mega", "Giga" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "var" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/ReciprocalArea.json b/Common/UnitDefinitions/ReciprocalArea.json
index 425302d1cd..37490de552 100644
--- a/Common/UnitDefinitions/ReciprocalArea.json
+++ b/Common/UnitDefinitions/ReciprocalArea.json
@@ -10,6 +10,9 @@
{
"SingularName": "InverseSquareMeter",
"PluralName": "InverseSquareMeters",
+ "BaseUnits": {
+ "L": "Meter"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -22,6 +25,9 @@
{
"SingularName": "InverseSquareKilometer",
"PluralName": "InverseSquareKilometers",
+ "BaseUnits": {
+ "L": "Kilometer"
+ },
"FromUnitToBaseFunc": "{x} / 1e6",
"FromBaseToUnitFunc": "{x} * 1e6",
"Localization": [
@@ -34,6 +40,9 @@
{
"SingularName": "InverseSquareDecimeter",
"PluralName": "InverseSquareDecimeters",
+ "BaseUnits": {
+ "L": "Decimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e-2",
"FromBaseToUnitFunc": "{x} * 1e-2",
"Localization": [
@@ -46,6 +55,9 @@
{
"SingularName": "InverseSquareCentimeter",
"PluralName": "InverseSquareCentimeters",
+ "BaseUnits": {
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e-4",
"FromBaseToUnitFunc": "{x} * 1e-4",
"Localization": [
@@ -58,6 +70,9 @@
{
"SingularName": "InverseSquareMillimeter",
"PluralName": "InverseSquareMillimeters",
+ "BaseUnits": {
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e-6",
"FromBaseToUnitFunc": "{x} * 1e-6",
"Localization": [
@@ -70,6 +85,9 @@
{
"SingularName": "InverseSquareMicrometer",
"PluralName": "InverseSquareMicrometers",
+ "BaseUnits": {
+ "L": "Micrometer"
+ },
"FromUnitToBaseFunc": "{x} / 1e-12",
"FromBaseToUnitFunc": "{x} * 1e-12",
"Localization": [
@@ -82,8 +100,11 @@
{
"SingularName": "InverseSquareMile",
"PluralName": "InverseSquareMiles",
- "FromUnitToBaseFunc": "{x} / 2.59e6",
- "FromBaseToUnitFunc": "{x} * 2.59e6",
+ "BaseUnits": {
+ "L": "Mile"
+ },
+ "FromUnitToBaseFunc": "{x} / (1609.344 * 1609.344)",
+ "FromBaseToUnitFunc": "{x} * (1609.344 * 1609.344)",
"Localization": [
{
"Culture": "en-US",
@@ -94,8 +115,11 @@
{
"SingularName": "InverseSquareYard",
"PluralName": "InverseSquareYards",
- "FromUnitToBaseFunc": "{x} / 0.836127",
- "FromBaseToUnitFunc": "{x} * 0.836127",
+ "BaseUnits": {
+ "L": "Yard"
+ },
+ "FromUnitToBaseFunc": "{x} / (0.9144 * 0.9144)",
+ "FromBaseToUnitFunc": "{x} * (0.9144 * 0.9144)",
"Localization": [
{
"Culture": "en-US",
@@ -106,8 +130,11 @@
{
"SingularName": "InverseSquareFoot",
"PluralName": "InverseSquareFeet",
- "FromUnitToBaseFunc": "{x} / 0.092903",
- "FromBaseToUnitFunc": "{x} * 0.092903",
+ "BaseUnits": {
+ "L": "Foot"
+ },
+ "FromUnitToBaseFunc": "{x} / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2",
"Localization": [
{
"Culture": "en-US",
@@ -118,8 +145,11 @@
{
"SingularName": "InverseUsSurveySquareFoot",
"PluralName": "InverseUsSurveySquareFeet",
- "FromUnitToBaseFunc": "{x} / 0.09290341161",
- "FromBaseToUnitFunc": "{x} * 0.09290341161",
+ "BaseUnits": {
+ "L": "UsSurveyFoot"
+ },
+ "FromUnitToBaseFunc": "{x} / (1200.0 / 3937.0) / (1200.0 / 3937.0)",
+ "FromBaseToUnitFunc": "{x} * (1200.0 / 3937.0) * (1200.0 / 3937.0)",
"Localization": [
{
"Culture": "en-US",
@@ -130,6 +160,9 @@
{
"SingularName": "InverseSquareInch",
"PluralName": "InverseSquareInches",
+ "BaseUnits": {
+ "L": "Inch"
+ },
"FromUnitToBaseFunc": "{x} / 0.00064516",
"FromBaseToUnitFunc": "{x} * 0.00064516",
"Localization": [
diff --git a/Common/UnitDefinitions/ReciprocalLength.json b/Common/UnitDefinitions/ReciprocalLength.json
index 400599c29f..2ea4841425 100644
--- a/Common/UnitDefinitions/ReciprocalLength.json
+++ b/Common/UnitDefinitions/ReciprocalLength.json
@@ -10,6 +10,9 @@
{
"SingularName": "InverseMeter",
"PluralName": "InverseMeters",
+ "BaseUnits": {
+ "L": "Meter"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -22,6 +25,9 @@
{
"SingularName": "InverseCentimeter",
"PluralName": "InverseCentimeters",
+ "BaseUnits": {
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} * 1e2",
"FromBaseToUnitFunc": "{x} / 1e2",
"Localization": [
@@ -34,6 +40,9 @@
{
"SingularName": "InverseMillimeter",
"PluralName": "InverseMillimeters",
+ "BaseUnits": {
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x} * 1e3",
"FromBaseToUnitFunc": "{x} / 1e3",
"Localization": [
@@ -46,6 +55,9 @@
{
"SingularName": "InverseMile",
"PluralName": "InverseMiles",
+ "BaseUnits": {
+ "L": "Mile"
+ },
"FromUnitToBaseFunc": "{x} / 1609.344",
"FromBaseToUnitFunc": "{x} * 1609.344",
"Localization": [
@@ -58,6 +70,9 @@
{
"SingularName": "InverseYard",
"PluralName": "InverseYards",
+ "BaseUnits": {
+ "L": "Yard"
+ },
"FromUnitToBaseFunc": "{x} / 0.9144",
"FromBaseToUnitFunc": "{x} * 0.9144",
"Localization": [
@@ -70,6 +85,9 @@
{
"SingularName": "InverseFoot",
"PluralName": "InverseFeet",
+ "BaseUnits": {
+ "L": "Foot"
+ },
"FromUnitToBaseFunc": "{x} / 0.3048",
"FromBaseToUnitFunc": "{x} * 0.3048",
"Localization": [
@@ -82,6 +100,9 @@
{
"SingularName": "InverseUsSurveyFoot",
"PluralName": "InverseUsSurveyFeet",
+ "BaseUnits": {
+ "L": "UsSurveyFoot"
+ },
"FromUnitToBaseFunc": "{x} * 3937 / 1200",
"FromBaseToUnitFunc": "{x} * 1200 / 3937",
"Localization": [
@@ -94,6 +115,9 @@
{
"SingularName": "InverseInch",
"PluralName": "InverseInches",
+ "BaseUnits": {
+ "L": "Inch"
+ },
"FromUnitToBaseFunc": "{x} / 2.54e-2",
"FromBaseToUnitFunc": "{x} * 2.54e-2",
"Localization": [
@@ -106,6 +130,9 @@
{
"SingularName": "InverseMil",
"PluralName": "InverseMils",
+ "BaseUnits": {
+ "L": "Mil"
+ },
"FromUnitToBaseFunc": "{x} / 2.54e-5",
"FromBaseToUnitFunc": "{x} * 2.54e-5",
"Localization": [
@@ -118,6 +145,9 @@
{
"SingularName": "InverseMicroinch",
"PluralName": "InverseMicroinches",
+ "BaseUnits": {
+ "L": "Microinch"
+ },
"FromUnitToBaseFunc": "{x} / 2.54e-8",
"FromBaseToUnitFunc": "{x} * 2.54e-8",
"Localization": [
diff --git a/Common/UnitDefinitions/RotationalAcceleration.json b/Common/UnitDefinitions/RotationalAcceleration.json
index 90e7ce0879..6f6df6f2bd 100644
--- a/Common/UnitDefinitions/RotationalAcceleration.json
+++ b/Common/UnitDefinitions/RotationalAcceleration.json
@@ -9,6 +9,9 @@
{
"SingularName": "RadianPerSecondSquared",
"PluralName": "RadiansPerSecondSquared",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
diff --git a/Common/UnitDefinitions/RotationalSpeed.json b/Common/UnitDefinitions/RotationalSpeed.json
index 0ee2d13ab0..b64a6569e5 100644
--- a/Common/UnitDefinitions/RotationalSpeed.json
+++ b/Common/UnitDefinitions/RotationalSpeed.json
@@ -9,6 +9,9 @@
{
"SingularName": "RadianPerSecond",
"PluralName": "RadiansPerSecond",
+ "BaseUnits": {
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci" ],
@@ -55,8 +58,8 @@
{
"SingularName": "RevolutionPerSecond",
"PluralName": "RevolutionsPerSecond",
- "FromUnitToBaseFunc": "{x} * 6.2831853072",
- "FromBaseToUnitFunc": "{x} / 6.2831853072",
+ "FromUnitToBaseFunc": "{x} * 2 * Math.PI",
+ "FromBaseToUnitFunc": "{x} / (2 * Math.PI)",
"Localization": [
{
"Culture": "en-US",
@@ -71,8 +74,8 @@
{
"SingularName": "RevolutionPerMinute",
"PluralName": "RevolutionsPerMinute",
- "FromUnitToBaseFunc": "({x} * 6.2831853072) / 60",
- "FromBaseToUnitFunc": "({x} / 6.2831853072) * 60",
+ "FromUnitToBaseFunc": "({x} * 2 * Math.PI) / 60",
+ "FromBaseToUnitFunc": "({x} / (2 * Math.PI)) * 60",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/RotationalStiffness.json b/Common/UnitDefinitions/RotationalStiffness.json
index eeadfe573d..a77c0f55ed 100644
--- a/Common/UnitDefinitions/RotationalStiffness.json
+++ b/Common/UnitDefinitions/RotationalStiffness.json
@@ -11,6 +11,11 @@
{
"SingularName": "NewtonMeterPerRadian",
"PluralName": "NewtonMetersPerRadian",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -24,8 +29,8 @@
{
"SingularName": "PoundForceFootPerDegrees",
"PluralName": "PoundForceFeetPerDegrees",
- "FromUnitToBaseFunc": "{x} * 77.6826",
- "FromBaseToUnitFunc": "{x} / 77.6826",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605 * 0.3048 * 180 / Math.PI)",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605 * 0.3048 * 180 / Math.PI)",
"Localization": [
{
"Culture": "en-US",
@@ -36,8 +41,8 @@
{
"SingularName": "KilopoundForceFootPerDegrees",
"PluralName": "KilopoundForceFeetPerDegrees",
- "FromUnitToBaseFunc": "{x} * 77682.6",
- "FromBaseToUnitFunc": "{x} / 77682.6",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605e3 * 0.3048 * 180 / Math.PI)",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605e3 * 0.3048 * 180 / Math.PI)",
"Localization": [
{
"Culture": "en-US",
@@ -87,8 +92,8 @@
{
"SingularName": "PoundForceFeetPerRadian",
"PluralName": "PoundForceFeetPerRadian",
- "FromUnitToBaseFunc": "{x} * 1.3558179483314",
- "FromBaseToUnitFunc": "{x} / 1.3558179483314",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 * 0.3048",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605 * 0.3048)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/RotationalStiffnessPerLength.json b/Common/UnitDefinitions/RotationalStiffnessPerLength.json
index 791ee833a1..ebfd1861d5 100644
--- a/Common/UnitDefinitions/RotationalStiffnessPerLength.json
+++ b/Common/UnitDefinitions/RotationalStiffnessPerLength.json
@@ -11,6 +11,11 @@
{
"SingularName": "NewtonMeterPerRadianPerMeter",
"PluralName": "NewtonMetersPerRadianPerMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -24,8 +29,8 @@
{
"SingularName": "PoundForceFootPerDegreesPerFoot",
"PluralName": "PoundForceFeetPerDegreesPerFeet",
- "FromUnitToBaseFunc": "{x} * 254.864324570",
- "FromBaseToUnitFunc": "{x} / 254.864324570",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605 * 180 / Math.PI)",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605 * 180 / Math.PI)",
"Localization": [
{
"Culture": "en-US",
@@ -36,8 +41,8 @@
{
"SingularName": "KilopoundForceFootPerDegreesPerFoot",
"PluralName": "KilopoundForceFeetPerDegreesPerFeet",
- "FromUnitToBaseFunc": "{x} * 254864.324570",
- "FromBaseToUnitFunc": "{x} / 254864.324570",
+ "FromUnitToBaseFunc": "{x} * (4.4482216152605e3 * 180 / Math.PI)",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605e3 * 180 / Math.PI)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/SpecificEnergy.json b/Common/UnitDefinitions/SpecificEnergy.json
index ad8ed862f2..2fa10c2ccc 100644
--- a/Common/UnitDefinitions/SpecificEnergy.json
+++ b/Common/UnitDefinitions/SpecificEnergy.json
@@ -11,6 +11,10 @@
{
"SingularName": "JoulePerKilogram",
"PluralName": "JoulesPerKilogram",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -114,8 +118,8 @@
{
"SingularName": "BtuPerPound",
"PluralName": "BtuPerPound",
- "FromUnitToBaseFunc": "{x} * 2326.000075362",
- "FromBaseToUnitFunc": "{x} / 2326.000075362",
+ "FromUnitToBaseFunc": "{x} * 1055.05585262 / 0.45359237",
+ "FromBaseToUnitFunc": "{x} * 0.45359237 / 1055.05585262",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/SpecificEntropy.json b/Common/UnitDefinitions/SpecificEntropy.json
index 998c6e9bd7..16d2433958 100644
--- a/Common/UnitDefinitions/SpecificEntropy.json
+++ b/Common/UnitDefinitions/SpecificEntropy.json
@@ -11,6 +11,11 @@
{
"SingularName": "JoulePerKilogramKelvin",
"PluralName": "JoulesPerKilogramKelvin",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -24,6 +29,11 @@
{
"SingularName": "JoulePerKilogramDegreeCelsius",
"PluralName": "JoulesPerKilogramDegreeCelsius",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -55,7 +65,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/lb·°F", "BTU/lbm·°F" ]
+ "Abbreviations": [ "BTU/(lb·°F)", "BTU/(lbm·°F)" ]
}
]
}
diff --git a/Common/UnitDefinitions/SpecificFuelConsumption.json b/Common/UnitDefinitions/SpecificFuelConsumption.json
index 82f94b6804..fefde34c37 100644
--- a/Common/UnitDefinitions/SpecificFuelConsumption.json
+++ b/Common/UnitDefinitions/SpecificFuelConsumption.json
@@ -1,14 +1,18 @@
{
"Name": "SpecificFuelConsumption",
- "BaseUnit": "GramPerKiloNewtonSecond",
+ "BaseUnit": "GramPerKilonewtonSecond",
"XmlDocSummary": "SFC is the fuel efficiency of an engine design with respect to thrust output",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Thrust-specific_fuel_consumption",
+ "BaseDimensions": {
+ "L": -1,
+ "T": 1
+ },
"Units": [
{
"SingularName": "PoundMassPerPoundForceHour",
"PluralName": "PoundsMassPerPoundForceHour",
- "FromUnitToBaseFunc": "{x} * 28.33",
- "FromBaseToUnitFunc": "{x} / 28.33",
+ "FromUnitToBaseFunc": "{x} * 1000 / (9.80665e-3 * 3600)",
+ "FromBaseToUnitFunc": "{x} * 9.80665e-3 * 3600 / 1000",
"Localization": [
{
"Culture": "en-US",
@@ -19,8 +23,8 @@
{
"SingularName": "KilogramPerKilogramForceHour",
"PluralName": "KilogramsPerKilogramForceHour",
- "FromUnitToBaseFunc": "{x} * 28.33",
- "FromBaseToUnitFunc": "{x} / 28.33",
+ "FromUnitToBaseFunc": "{x} * 1000 / (9.80665e-3 * 3600)",
+ "FromBaseToUnitFunc": "{x} * 9.80665e-3 * 3600 / 1000",
"Localization": [
{
"Culture": "en-US",
@@ -29,8 +33,12 @@
]
},
{
- "SingularName": "GramPerKiloNewtonSecond",
- "PluralName": "GramsPerKiloNewtonSecond",
+ "SingularName": "GramPerKilonewtonSecond",
+ "PluralName": "GramsPerKilonewtonSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo" ],
diff --git a/Common/UnitDefinitions/SpecificVolume.json b/Common/UnitDefinitions/SpecificVolume.json
index a428f3355d..aa9939832a 100644
--- a/Common/UnitDefinitions/SpecificVolume.json
+++ b/Common/UnitDefinitions/SpecificVolume.json
@@ -10,6 +10,10 @@
{
"SingularName": "CubicMeterPerKilogram",
"PluralName": "CubicMetersPerKilogram",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Milli" ],
@@ -23,8 +27,12 @@
{
"SingularName": "CubicFootPerPound",
"PluralName": "CubicFeetPerPound",
- "FromUnitToBaseFunc": "{x} / 16.01846353",
- "FromBaseToUnitFunc": "{x} * 16.01846353",
+ "BaseUnits": {
+ "L": "Foot",
+ "M": "Pound"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592 / 0.45359237",
+ "FromBaseToUnitFunc": "{x} * 0.45359237 / 0.028316846592",
"Prefixes": [],
"Localization": [
{
diff --git a/Common/UnitDefinitions/SpecificWeight.json b/Common/UnitDefinitions/SpecificWeight.json
index 3ff8a8f11a..f56d545639 100644
--- a/Common/UnitDefinitions/SpecificWeight.json
+++ b/Common/UnitDefinitions/SpecificWeight.json
@@ -38,6 +38,11 @@
{
"SingularName": "NewtonPerCubicMeter",
"PluralName": "NewtonsPerCubicMeter",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -87,8 +92,8 @@
{
"SingularName": "PoundForcePerCubicInch",
"PluralName": "PoundsForcePerCubicInch",
- "FromUnitToBaseFunc": "{x} * 2.714471375263134e5",
- "FromBaseToUnitFunc": "{x} / 2.714471375263134e5",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 1.6387064e-5",
+ "FromBaseToUnitFunc": "{x} * 1.6387064e-5 / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
@@ -101,8 +106,8 @@
{
"SingularName": "PoundForcePerCubicFoot",
"PluralName": "PoundsForcePerCubicFoot",
- "FromUnitToBaseFunc": "{x} * 1.570874638462462e2",
- "FromBaseToUnitFunc": "{x} / 1.570874638462462e2",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 / 0.028316846592",
+ "FromBaseToUnitFunc": "{x} * 0.028316846592 / 4.4482216152605",
"Prefixes": [ "Kilo" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/Speed.json b/Common/UnitDefinitions/Speed.json
index f17f8a321c..6a127121e5 100644
--- a/Common/UnitDefinitions/Speed.json
+++ b/Common/UnitDefinitions/Speed.json
@@ -30,7 +30,7 @@
},
{
"SingularName": "MeterPerMinute",
- "PluralName": "MetersPerMinutes",
+ "PluralName": "MetersPerMinute",
"BaseUnits": {
"L": "Meter",
"T": "Minute"
diff --git a/Common/UnitDefinitions/StandardVolumeFlow.json b/Common/UnitDefinitions/StandardVolumeFlow.json
index bf731df37e..7cf13a7837 100644
--- a/Common/UnitDefinitions/StandardVolumeFlow.json
+++ b/Common/UnitDefinitions/StandardVolumeFlow.json
@@ -10,6 +10,10 @@
{
"SingularName": "StandardCubicMeterPerSecond",
"PluralName": "StandardCubicMetersPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -22,6 +26,10 @@
{
"SingularName": "StandardCubicMeterPerMinute",
"PluralName": "StandardCubicMetersPerMinute",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
@@ -34,6 +42,10 @@
{
"SingularName": "StandardCubicMeterPerHour",
"PluralName": "StandardCubicMetersPerHour",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
@@ -46,6 +58,10 @@
{
"SingularName": "StandardCubicMeterPerDay",
"PluralName": "StandardCubicMetersPerDay",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Day"
+ },
"FromUnitToBaseFunc": "{x} / 86400",
"FromBaseToUnitFunc": "{x} * 86400",
"Localization": [
@@ -58,6 +74,10 @@
{
"SingularName": "StandardCubicCentimeterPerMinute",
"PluralName": "StandardCubicCentimetersPerMinute",
+ "BaseUnits": {
+ "L": "Centimeter",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 6e7",
"FromBaseToUnitFunc": "{x} * 6e7",
"Localization": [
@@ -70,6 +90,10 @@
{
"SingularName": "StandardLiterPerMinute",
"PluralName": "StandardLitersPerMinute",
+ "BaseUnits": {
+ "L": "Decimeter",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60000",
"FromBaseToUnitFunc": "{x} * 60000",
"Localization": [
@@ -82,8 +106,12 @@
{
"SingularName": "StandardCubicFootPerSecond",
"PluralName": "StandardCubicFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 35.314666721",
- "FromBaseToUnitFunc": "{x} * 35.314666721",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Second"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592",
+ "FromBaseToUnitFunc": "{x} / 0.028316846592",
"Localization": [
{
"Culture": "en-US",
@@ -94,8 +122,12 @@
{
"SingularName": "StandardCubicFootPerMinute",
"PluralName": "StandardCubicFeetPerMinute",
- "FromUnitToBaseFunc": "{x} / 2118.88000326",
- "FromBaseToUnitFunc": "{x} * 2118.88000326",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Minute"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.028316846592 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -106,8 +138,12 @@
{
"SingularName": "StandardCubicFootPerHour",
"PluralName": "StandardCubicFeetPerHour",
- "FromUnitToBaseFunc": "{x} * 7.8657907199999087346816086183876e-6",
- "FromBaseToUnitFunc": "{x} / 7.8657907199999087346816086183876e-6",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.028316846592 / 3600)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Temperature.json b/Common/UnitDefinitions/Temperature.json
index 9a5ec73aee..c782600ae7 100644
--- a/Common/UnitDefinitions/Temperature.json
+++ b/Common/UnitDefinitions/Temperature.json
@@ -41,7 +41,7 @@
"SingularName": "MillidegreeCelsius",
"PluralName": "MillidegreesCelsius",
"BaseUnits": {
- "Θ": "DegreeCelsius"
+ "Θ": "MillidegreeCelsius"
},
"FromUnitToBaseFunc": "{x} / 1000 + 273.15",
"FromBaseToUnitFunc": "({x} - 273.15) * 1000",
@@ -145,6 +145,9 @@
{
"SingularName": "SolarTemperature",
"PluralName": "SolarTemperatures",
+ "BaseUnits": {
+ "Θ": "SolarTemperature"
+ },
"FromUnitToBaseFunc": "{x} * 5778",
"FromBaseToUnitFunc": "{x} / 5778",
"Localization": [
diff --git a/Common/UnitDefinitions/TemperatureChangeRate.json b/Common/UnitDefinitions/TemperatureChangeRate.json
index 1a8bc7b534..dbb72d4473 100644
--- a/Common/UnitDefinitions/TemperatureChangeRate.json
+++ b/Common/UnitDefinitions/TemperatureChangeRate.json
@@ -10,6 +10,10 @@
{
"SingularName": "DegreeCelsiusPerSecond",
"PluralName": "DegreesCelsiusPerSecond",
+ "BaseUnits": {
+ "Θ": "DegreeCelsius",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo" ],
@@ -23,6 +27,10 @@
{
"SingularName": "DegreeCelsiusPerMinute",
"PluralName": "DegreesCelsiusPerMinute",
+ "BaseUnits": {
+ "Θ": "DegreeCelsius",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
@@ -35,6 +43,10 @@
{
"SingularName": "DegreeKelvinPerMinute",
"PluralName": "DegreesKelvinPerMinute",
+ "BaseUnits": {
+ "Θ": "Kelvin",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Prefixes": [],
@@ -48,6 +60,10 @@
{
"SingularName": "DegreeFahrenheitPerMinute",
"PluralName": "DegreesFahrenheitPerMinute",
+ "BaseUnits": {
+ "Θ": "DegreeFahrenheit",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 9 / 60",
"FromBaseToUnitFunc": "{x} * 9 / 5 * 60",
"Localization": [
@@ -60,6 +76,10 @@
{
"SingularName": "DegreeFahrenheitPerSecond",
"PluralName": "DegreesFahrenheitPerSecond",
+ "BaseUnits": {
+ "Θ": "DegreeFahrenheit",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 9",
"FromBaseToUnitFunc": "{x} * 9 / 5",
"Localization": [
@@ -72,6 +92,10 @@
{
"SingularName": "DegreeKelvinPerSecond",
"PluralName": "DegreesKelvinPerSecond",
+ "BaseUnits": {
+ "Θ": "Kelvin",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [],
@@ -85,6 +109,10 @@
{
"SingularName": "DegreeCelsiusPerHour",
"PluralName": "DegreesCelsiusPerHour",
+ "BaseUnits": {
+ "Θ": "DegreeCelsius",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
@@ -97,6 +125,10 @@
{
"SingularName": "DegreeKelvinPerHour",
"PluralName": "DegreesKelvinPerHour",
+ "BaseUnits": {
+ "Θ": "Kelvin",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Prefixes": [],
@@ -110,6 +142,10 @@
{
"SingularName": "DegreeFahrenheitPerHour",
"PluralName": "DegreesFahrenheitPerHour",
+ "BaseUnits": {
+ "Θ": "DegreeFahrenheit",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 9 / 3600",
"FromBaseToUnitFunc": "{x} * 9 / 5 * 3600",
"Localization": [
diff --git a/Common/UnitDefinitions/TemperatureDelta.json b/Common/UnitDefinitions/TemperatureDelta.json
index 9215f4ec24..04ef0a53a9 100644
--- a/Common/UnitDefinitions/TemperatureDelta.json
+++ b/Common/UnitDefinitions/TemperatureDelta.json
@@ -9,6 +9,9 @@
{
"SingularName": "Kelvin",
"PluralName": "Kelvins",
+ "BaseUnits": {
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -21,6 +24,9 @@
{
"SingularName": "DegreeCelsius",
"PluralName": "DegreesCelsius",
+ "BaseUnits": {
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Milli" ],
@@ -35,6 +41,9 @@
{
"SingularName": "DegreeDelisle",
"PluralName": "DegreesDelisle",
+ "BaseUnits": {
+ "Θ": "DegreeDelisle"
+ },
"FromUnitToBaseFunc": "{x} * -2 / 3",
"FromBaseToUnitFunc": "{x} * -3 / 2",
"Localization": [
@@ -47,6 +56,9 @@
{
"SingularName": "DegreeFahrenheit",
"PluralName": "DegreesFahrenheit",
+ "BaseUnits": {
+ "Θ": "DegreeFahrenheit"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 9",
"FromBaseToUnitFunc": "{x} * 9 / 5",
"Localization": [
@@ -59,6 +71,9 @@
{
"SingularName": "DegreeNewton",
"PluralName": "DegreesNewton",
+ "BaseUnits": {
+ "Θ": "DegreeNewton"
+ },
"FromUnitToBaseFunc": "{x} * 100 / 33",
"FromBaseToUnitFunc": "{x} * 33 / 100",
"Localization": [
@@ -71,6 +86,9 @@
{
"SingularName": "DegreeRankine",
"PluralName": "DegreesRankine",
+ "BaseUnits": {
+ "Θ": "DegreeRankine"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 9",
"FromBaseToUnitFunc": "{x} * 9 / 5",
"Localization": [
@@ -83,6 +101,9 @@
{
"SingularName": "DegreeReaumur",
"PluralName": "DegreesReaumur",
+ "BaseUnits": {
+ "Θ": "DegreeReaumur"
+ },
"FromUnitToBaseFunc": "{x} * 5 / 4",
"FromBaseToUnitFunc": "{x} * 4 / 5",
"Localization": [
@@ -95,6 +116,9 @@
{
"SingularName": "DegreeRoemer",
"PluralName": "DegreesRoemer",
+ "BaseUnits": {
+ "Θ": "DegreeRoemer"
+ },
"FromUnitToBaseFunc": "{x} * 40 / 21",
"FromBaseToUnitFunc": "{x} * 21 / 40",
"Localization": [
diff --git a/Common/UnitDefinitions/TemperatureGradient.json b/Common/UnitDefinitions/TemperatureGradient.json
index d0cf566fc1..d2c9d5f5bd 100644
--- a/Common/UnitDefinitions/TemperatureGradient.json
+++ b/Common/UnitDefinitions/TemperatureGradient.json
@@ -25,7 +25,7 @@
},
{
"SingularName": "DegreeCelsiusPerMeter",
- "PluralName": "DegreesCelciusPerMeter",
+ "PluralName": "DegreesCelsiusPerMeter",
"BaseUnits": {
"L": "Meter",
"Θ": "DegreeCelsius"
@@ -57,7 +57,7 @@
},
{
"SingularName": "DegreeCelsiusPerKilometer",
- "PluralName": "DegreesCelciusPerKilometer",
+ "PluralName": "DegreesCelsiusPerKilometer",
"BaseUnits": {
"L": "Kilometer",
"Θ": "DegreeCelsius"
diff --git a/Common/UnitDefinitions/ThermalConductivity.json b/Common/UnitDefinitions/ThermalConductivity.json
index 46f26a935e..c5f30282b8 100644
--- a/Common/UnitDefinitions/ThermalConductivity.json
+++ b/Common/UnitDefinitions/ThermalConductivity.json
@@ -13,24 +13,30 @@
{
"SingularName": "WattPerMeterKelvin",
"PluralName": "WattsPerMeterKelvin",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "W/m·K" ]
+ "Abbreviations": [ "W/(m·K)" ]
}
]
},
{
"SingularName": "BtuPerHourFootFahrenheit",
"PluralName": "BtusPerHourFootFahrenheit",
- "FromUnitToBaseFunc": "{x} * 1.73073467",
- "FromBaseToUnitFunc": "{x} / 1.73073467",
+ "FromUnitToBaseFunc": "{x} * ((1055.05585262 / (0.3048 * 3600)) * 1.8)",
+ "FromBaseToUnitFunc": "{x} / ((1055.05585262 / (0.3048 * 3600)) * 1.8)",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/h·ft·°F" ]
+ "Abbreviations": [ "BTU/(h·ft·°F)" ]
}
]
}
diff --git a/Common/UnitDefinitions/ThermalResistance.json b/Common/UnitDefinitions/ThermalInsulance.json
similarity index 62%
rename from Common/UnitDefinitions/ThermalResistance.json
rename to Common/UnitDefinitions/ThermalInsulance.json
index 91da569fbc..7e9ae0a217 100644
--- a/Common/UnitDefinitions/ThermalResistance.json
+++ b/Common/UnitDefinitions/ThermalInsulance.json
@@ -1,7 +1,7 @@
{
- "Name": "ThermalResistance",
+ "Name": "ThermalInsulance",
"BaseUnit": "SquareMeterKelvinPerKilowatt",
- "XmlDocSummary": "Heat Transfer Coefficient or Thermal conductivity - indicates a materials ability to conduct heat.",
+ "XmlDocSummary": "Thermal insulance (R-value) is a measure of a material's resistance to the heat current. It quantifies how effectively a material can resist the transfer of heat through conduction, convection, and radiation. It has the units square metre kelvins per watt (m2⋅K/W) in SI units or square foot degree Fahrenheit–hours per British thermal unit (ft2⋅°F⋅h/Btu) in imperial units. The higher the thermal insulance, the better a material insulates against heat transfer. It is commonly used in construction to assess the insulation properties of materials such as walls, roofs, and insulation products.",
"BaseDimensions": {
"M": -1,
"T": 3,
@@ -23,6 +23,11 @@
{
"SingularName": "SquareMeterKelvinPerWatt",
"PluralName": "SquareMeterKelvinsPerWatt",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x} * 1000",
"FromBaseToUnitFunc": "{x} / 1000",
"Localization": [
@@ -35,6 +40,11 @@
{
"SingularName": "SquareMeterDegreeCelsiusPerWatt",
"PluralName": "SquareMeterDegreesCelsiusPerWatt",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "T": "Second",
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x} * 1000.0",
"FromBaseToUnitFunc": "{x} / 1000.0",
"Localization": [
@@ -59,8 +69,8 @@
{
"SingularName": "SquareCentimeterHourDegreeCelsiusPerKilocalorie",
"PluralName": "SquareCentimeterHourDegreesCelsiusPerKilocalorie",
- "FromUnitToBaseFunc": "{x} * 0.0859779507590433",
- "FromBaseToUnitFunc": "{x} / 0.0859779507590433",
+ "FromUnitToBaseFunc": "{x} * (0.0001 * 3600) / 4.184",
+ "FromBaseToUnitFunc": "{x} * 4.184 / (0.0001 * 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -71,8 +81,8 @@
{
"SingularName": "HourSquareFeetDegreeFahrenheitPerBtu",
"PluralName": "HourSquareFeetDegreesFahrenheitPerBtu",
- "FromUnitToBaseFunc": "{x} * 176.1121482159839",
- "FromBaseToUnitFunc": "{x} / 176.1121482159839",
+ "FromUnitToBaseFunc": "{x} * (1000 * 0.3048 * 0.3048 * 3600) / (1055.05585262 * 1.8)",
+ "FromBaseToUnitFunc": "{x} * (1055.05585262 * 1.8) / (1000 * 0.3048 * 0.3048 * 3600)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/Torque.json b/Common/UnitDefinitions/Torque.json
index 4567759fe8..d19cebd6ad 100644
--- a/Common/UnitDefinitions/Torque.json
+++ b/Common/UnitDefinitions/Torque.json
@@ -37,6 +37,11 @@
{
"SingularName": "NewtonMeter",
"PluralName": "NewtonMeters",
+ "BaseUnits": {
+ "L": "Meter",
+ "M": "Kilogram",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
@@ -54,8 +59,8 @@
{
"SingularName": "PoundalFoot",
"PluralName": "PoundalFeet",
- "FromUnitToBaseFunc": "{x} * 4.21401100938048e-2",
- "FromBaseToUnitFunc": "{x} / 4.21401100938048e-2",
+ "FromUnitToBaseFunc": "{x} * 0.138254954376 * 0.3048",
+ "FromBaseToUnitFunc": "{x} / (0.138254954376 * 0.3048)",
"Localization": [
{
"Culture": "en-US",
@@ -66,8 +71,8 @@
{
"SingularName": "PoundForceInch",
"PluralName": "PoundForceInches",
- "FromUnitToBaseFunc": "{x} * 1.129848290276167e-1",
- "FromBaseToUnitFunc": "{x} / 1.129848290276167e-1",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 * 2.54e-2",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605 * 2.54e-2)",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
@@ -80,8 +85,8 @@
{
"SingularName": "PoundForceFoot",
"PluralName": "PoundForceFeet",
- "FromUnitToBaseFunc": "{x} * 1.3558179483314",
- "FromBaseToUnitFunc": "{x} / 1.3558179483314",
+ "FromUnitToBaseFunc": "{x} * 4.4482216152605 * 0.3048",
+ "FromBaseToUnitFunc": "{x} / (4.4482216152605 * 0.3048)",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
diff --git a/Common/UnitDefinitions/TorquePerLength.json b/Common/UnitDefinitions/TorquePerLength.json
deleted file mode 100644
index 89728fdc7f..0000000000
--- a/Common/UnitDefinitions/TorquePerLength.json
+++ /dev/null
@@ -1,155 +0,0 @@
-{
- "Name": "TorquePerLength",
- "BaseUnit": "NewtonMeterPerMeter",
- "XmlDocSummary": "The magnitude of torque per unit length.",
- "BaseDimensions": {
- "L": 1,
- "M": 1,
- "T": -2
- },
- "Units": [
- {
- "SingularName": "NewtonMillimeterPerMeter",
- "PluralName": "NewtonMillimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 0.001",
- "FromBaseToUnitFunc": "{x} * 1000",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "N·mm/m" ]
- }
- ]
- },
- {
- "SingularName": "NewtonCentimeterPerMeter",
- "PluralName": "NewtonCentimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 0.01",
- "FromBaseToUnitFunc": "{x} * 100",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "N·cm/m" ]
- }
- ]
- },
- {
- "SingularName": "NewtonMeterPerMeter",
- "PluralName": "NewtonMetersPerMeter",
- "FromUnitToBaseFunc": "{x}",
- "FromBaseToUnitFunc": "{x}",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "N·m/m" ]
- },
- {
- "Culture": "ru-RU",
- "Abbreviations": [ "Н·м/м" ]
- }
- ]
- },
- {
- "SingularName": "PoundForceInchPerFoot",
- "PluralName": "PoundForceInchesPerFoot",
- "FromUnitToBaseFunc": "{x} * 0.370685147638",
- "FromBaseToUnitFunc": "{x} / 0.370685147638",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "lbf·in/ft" ],
- "AbbreviationsForPrefixes": { "Kilo": "kipf·in/ft" }
- }
- ]
- },
- {
- "SingularName": "PoundForceFootPerFoot",
- "PluralName": "PoundForceFeetPerFoot",
- "FromUnitToBaseFunc": "{x} * 4.44822161526",
- "FromBaseToUnitFunc": "{x} / 4.44822161526",
- "Prefixes": [ "Kilo", "Mega" ],
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "lbf·ft/ft" ],
- "AbbreviationsForPrefixes": { "Kilo": "kipf·ft/ft" }
- }
- ]
- },
- {
- "SingularName": "KilogramForceMillimeterPerMeter",
- "PluralName": "KilogramForceMillimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 0.00980665019960652",
- "FromBaseToUnitFunc": "{x} * 101.971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "kgf·mm/m" ]
- }
- ]
- },
- {
- "SingularName": "KilogramForceCentimeterPerMeter",
- "PluralName": "KilogramForceCentimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 0.0980665019960652",
- "FromBaseToUnitFunc": "{x} * 10.1971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "kgf·cm/m" ]
- }
- ]
- },
- {
- "SingularName": "KilogramForceMeterPerMeter",
- "PluralName": "KilogramForceMetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 9.80665019960652",
- "FromBaseToUnitFunc": "{x} * 0.101971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "kgf·m/m" ]
- }
- ]
- },
- {
- "SingularName": "TonneForceMillimeterPerMeter",
- "PluralName": "TonneForceMillimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 9.80665019960652",
- "FromBaseToUnitFunc": "{x} * 0.101971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "tf·mm/m" ]
- }
- ]
- },
- {
- "SingularName": "TonneForceCentimeterPerMeter",
- "PluralName": "TonneForceCentimetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 98.0665019960652",
- "FromBaseToUnitFunc": "{x} * 0.0101971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "tf·cm/m" ]
- }
- ]
- },
- {
- "SingularName": "TonneForceMeterPerMeter",
- "PluralName": "TonneForceMetersPerMeter",
- "FromUnitToBaseFunc": "{x} * 9806.65019960653",
- "FromBaseToUnitFunc": "{x} * 0.000101971619222242",
- "Localization": [
- {
- "Culture": "en-US",
- "Abbreviations": [ "tf·m/m" ]
- }
- ]
- }
- ]
-}
diff --git a/Common/UnitDefinitions/Volume.json b/Common/UnitDefinitions/Volume.json
index 270d3d2275..6abde4c0d0 100644
--- a/Common/UnitDefinitions/Volume.json
+++ b/Common/UnitDefinitions/Volume.json
@@ -9,6 +9,9 @@
{
"SingularName": "Liter",
"PluralName": "Liters",
+ "BaseUnits": {
+ "L": "Decimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
@@ -46,6 +49,9 @@
{
"SingularName": "CubicKilometer",
"PluralName": "CubicKilometers",
+ "BaseUnits": {
+ "L": "Kilometer"
+ },
"FromUnitToBaseFunc": "{x} * 1e9",
"FromBaseToUnitFunc": "{x} / 1e9",
"Localization": [
@@ -81,6 +87,9 @@
{
"SingularName": "CubicDecimeter",
"PluralName": "CubicDecimeters",
+ "BaseUnits": {
+ "L": "Decimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e3",
"FromBaseToUnitFunc": "{x} * 1e3",
"Localization": [
@@ -97,6 +106,9 @@
{
"SingularName": "CubicCentimeter",
"PluralName": "CubicCentimeters",
+ "BaseUnits": {
+ "L": "Centimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e6",
"FromBaseToUnitFunc": "{x} * 1e6",
"Localization": [
@@ -113,6 +125,9 @@
{
"SingularName": "CubicMillimeter",
"PluralName": "CubicMillimeters",
+ "BaseUnits": {
+ "L": "Millimeter"
+ },
"FromUnitToBaseFunc": "{x} / 1e9",
"FromBaseToUnitFunc": "{x} * 1e9",
"Localization": [
@@ -129,6 +144,9 @@
{
"SingularName": "CubicMicrometer",
"PluralName": "CubicMicrometers",
+ "BaseUnits": {
+ "L": "Micrometer"
+ },
"FromUnitToBaseFunc": "{x} / 1e18",
"FromBaseToUnitFunc": "{x} * 1e18",
"Localization": [
@@ -145,8 +163,13 @@
{
"SingularName": "CubicMile",
"PluralName": "CubicMiles",
- "FromUnitToBaseFunc": "{x} * 4.16818182544058e9",
- "FromBaseToUnitFunc": "{x} / 4.16818182544058e9",
+ "BaseUnits": {
+ "L": "Mile"
+ },
+ "XmlDocSummary": "A cubic mile (abbreviation: cu mi or mi3) is an imperial and US customary (non-SI non-metric) unit of volume, used in the United States, Canada and the United Kingdom. It is defined as the volume of a cube with sides of 1 mile (63360 inches, 5280 feet, 1760 yards or ~1.609 kilometres) in length.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cubic_mile",
+ "FromUnitToBaseFunc": "{x} * 4.168181825440579584e9",
+ "FromBaseToUnitFunc": "{x} / 4.168181825440579584e9",
"Localization": [
{
"Culture": "en-US",
@@ -161,8 +184,13 @@
{
"SingularName": "CubicYard",
"PluralName": "CubicYards",
- "FromUnitToBaseFunc": "{x} * 0.764554858",
- "FromBaseToUnitFunc": "{x} / 0.764554858",
+ "BaseUnits": {
+ "L": "Yard"
+ },
+ "XmlDocSummary": "A cubic yard is an Imperial / U.S. customary (non-SI non-metric) unit of volume, used in Canada and the United States. It is defined as the volume of a cube with sides of 1 yard (3 feet, 36 inches, 0.9144 meters) in length.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cubic_yard",
+ "FromUnitToBaseFunc": "{x} * 0.764554857984",
+ "FromBaseToUnitFunc": "{x} / 0.764554857984",
"Localization": [
{
"Culture": "en-US",
@@ -177,8 +205,13 @@
{
"SingularName": "CubicFoot",
"PluralName": "CubicFeet",
- "FromUnitToBaseFunc": "{x} * 2.8316846592e-2",
- "FromBaseToUnitFunc": "{x} / 2.8316846592e-2",
+ "BaseUnits": {
+ "L": "Foot"
+ },
+ "XmlDocSummary": "The cubic foot (symbol ft3 or cu ft) is an imperial and US customary (non-metric) unit of volume, used in the United States and the United Kingdom. It is defined as the volume of a cube with sides of one foot (0.3048 m) in length.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cubic_foot",
+ "FromUnitToBaseFunc": "{x} * 0.028316846592",
+ "FromBaseToUnitFunc": "{x} / 0.028316846592",
"Prefixes": [ "Hecto", "Kilo", "Mega" ],
"Localization": [
{
@@ -194,6 +227,11 @@
{
"SingularName": "CubicInch",
"PluralName": "CubicInches",
+ "BaseUnits": {
+ "L": "Inch"
+ },
+ "XmlDocSummary": "The cubic inch (symbol in3) is a unit of volume in the Imperial units and United States customary units systems. It is the volume of a cube with each of its three dimensions (length, width, and height) being one inch long which is equivalent to 1/231 of a US gallon.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cubic_yard",
"FromUnitToBaseFunc": "{x} * 1.6387064e-5",
"FromBaseToUnitFunc": "{x} / 1.6387064e-5",
"Localization": [
@@ -210,10 +248,10 @@
{
"SingularName": "ImperialGallon",
"PluralName": "ImperialGallons",
- "FromUnitToBaseFunc": "{x} * 0.00454609",
- "FromBaseToUnitFunc": "{x} / 0.00454609",
"XmlDocSummary": "The British imperial gallon (frequently called simply \"gallon\") is defined as exactly 4.54609 litres.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Gallon#Imperial_gallon",
+ "FromUnitToBaseFunc": "{x} * 0.00454609",
+ "FromBaseToUnitFunc": "{x} / 0.00454609",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
@@ -229,8 +267,10 @@
{
"SingularName": "ImperialOunce",
"PluralName": "ImperialOunces",
- "FromUnitToBaseFunc": "{x} * 2.8413062499962901241875439064617e-5",
- "FromBaseToUnitFunc": "{x} / 2.8413062499962901241875439064617e-5",
+ "XmlDocSummary": "An imperial fluid ounce is 1⁄20 of an imperial pint, 1⁄160 of an imperial gallon or exactly 28.4130625 mL.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Fluid_ounce",
+ "FromUnitToBaseFunc": "{x} * 2.84130625e-5",
+ "FromBaseToUnitFunc": "{x} / 2.84130625e-5",
"Localization": [
{
"Culture": "en-US",
@@ -245,10 +285,10 @@
{
"SingularName": "UsGallon",
"PluralName": "UsGallons",
- "FromUnitToBaseFunc": "{x} * 0.003785411784",
- "FromBaseToUnitFunc": "{x} / 0.003785411784",
"XmlDocSummary": "The US liquid gallon (frequently called simply \"gallon\") is legally defined as 231 cubic inches, which is exactly 3.785411784 litres.",
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Gallon#US_liquid_gallon",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784",
+ "FromBaseToUnitFunc": "{x} / 0.003785411784",
"Prefixes": [ "Deca", "Deci", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
@@ -264,8 +304,10 @@
{
"SingularName": "UsOunce",
"PluralName": "UsOunces",
- "FromUnitToBaseFunc": "{x} * 2.957352956253760505068307980135e-5",
- "FromBaseToUnitFunc": "{x} / 2.957352956253760505068307980135e-5",
+ "XmlDocSummary": "A US customary fluid ounce is 1⁄16 of a US liquid pint and 1⁄128 of a US liquid gallon or exactly 29.5735295625 mL, making it about 4.08% larger than the imperial fluid ounce.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Fluid_ounce",
+ "FromUnitToBaseFunc": "{x} * 2.95735295625e-5",
+ "FromBaseToUnitFunc": "{x} / 2.95735295625e-5",
"Localization": [
{
"Culture": "en-US",
@@ -280,6 +322,8 @@
{
"SingularName": "UsTablespoon",
"PluralName": "UsTablespoons",
+ "XmlDocSummary": "The traditional U.S. interpretation of the tablespoon as a unit of volume is: 1 US tablespoon = 4 fluid drams, or 3 teaspoons or 1/2 US fluid ounce (≈ 14.8 ml)",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Tablespoon#United_States",
"FromUnitToBaseFunc": "{x} * 1.478676478125e-5",
"FromBaseToUnitFunc": "{x} / 1.478676478125e-5",
"Localization": [
@@ -300,6 +344,8 @@
{
"SingularName": "AuTablespoon",
"PluralName": "AuTablespoons",
+ "XmlDocSummary": "In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Tablespoon#Australia",
"FromUnitToBaseFunc": "{x} * 2e-5",
"FromBaseToUnitFunc": "{x} / 2e-5",
"Localization": [
@@ -320,6 +366,8 @@
{
"SingularName": "UkTablespoon",
"PluralName": "UkTablespoons",
+ "XmlDocSummary": "In nutrition labeling in the U.S. and the U.K., a tablespoon is defined as 15 ml (0.51 US fl oz). In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Tablespoon#International",
"FromUnitToBaseFunc": "{x} * 1.5e-5",
"FromBaseToUnitFunc": "{x} / 1.5e-5",
"Localization": [
@@ -340,6 +388,8 @@
{
"SingularName": "MetricTeaspoon",
"PluralName": "MetricTeaspoons",
+ "XmlDocSummary": "The metric teaspoon as a unit of culinary measure is 5 ml (0.18 imp fl oz; 0.17 US fl oz),[17] equal to 5 cm3, 1⁄3 UK/Canadian metric tablespoon, or 1⁄4 Australian metric tablespoon.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Teaspoon#Metric_teaspoon",
"FromUnitToBaseFunc": "{x} * 0.5e-5",
"FromBaseToUnitFunc": "{x} / 0.5e-5",
"Localization": [
@@ -360,6 +410,8 @@
{
"SingularName": "UsTeaspoon",
"PluralName": "UsTeaspoons",
+ "XmlDocSummary": "As a unit of culinary measure, one teaspoon in the United States is 1⁄3 tablespoon, exactly 4.92892159375 ml, 1 1⁄3 US fluid drams, 1⁄6 US fl oz, 1⁄48 US cup, 1⁄768 US liquid gallon, or 77⁄256 (0.30078125) cubic inches.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Teaspoon#United_States_customary_unit",
"FromUnitToBaseFunc": "{x} * 4.92892159375e-6",
"FromBaseToUnitFunc": "{x} / 4.92892159375e-6",
"Localization": [
@@ -380,6 +432,8 @@
{
"SingularName": "MetricCup",
"PluralName": "MetricCups",
+ "XmlDocSummary": "Australia, Canada, New Zealand, and some other members of the Commonwealth of Nations, being former British colonies that have since metricated, employ a metric cup of 250 millilitres. Although derived from the metric system, it is not an SI unit.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cup_(unit)#Metric_cup",
"FromUnitToBaseFunc": "{x} * 0.00025",
"FromBaseToUnitFunc": "{x} / 0.00025",
"Localization": [
@@ -392,6 +446,8 @@
{
"SingularName": "UsCustomaryCup",
"PluralName": "UsCustomaryCups",
+ "XmlDocSummary": "In the United States, the customary cup is half of a liquid pint or 1⁄16 US customary gallon which is 236.5882365 milliliters exactly.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cup_(unit)#Customary_cup",
"FromUnitToBaseFunc": "{x} * 0.0002365882365",
"FromBaseToUnitFunc": "{x} / 0.0002365882365",
"Localization": [
@@ -404,6 +460,8 @@
{
"SingularName": "UsLegalCup",
"PluralName": "UsLegalCups",
+ "XmlDocSummary": "The cup currently used in the United States for nutrition labelling is defined in United States law as 240 ml.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Cup_(unit)#Legal_cup",
"FromUnitToBaseFunc": "{x} * 0.00024",
"FromBaseToUnitFunc": "{x} / 0.00024",
"Localization": [
@@ -416,6 +474,8 @@
{
"SingularName": "OilBarrel",
"PluralName": "OilBarrels",
+ "XmlDocSummary": "In the oil industry, one barrel (unit symbol bbl) is a unit of volume used for measuring oil defined as exactly 42 US gallons, approximately 159 liters, or 35 imperial gallons.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Barrel_(unit)#Oil_barrel",
"FromUnitToBaseFunc": "{x} * 0.158987294928",
"FromBaseToUnitFunc": "{x} / 0.158987294928",
"Localization": [
@@ -428,8 +488,10 @@
{
"SingularName": "UsBeerBarrel",
"PluralName": "UsBeerBarrels",
- "FromUnitToBaseFunc": "{x} * 0.1173477658",
- "FromBaseToUnitFunc": "{x} / 0.1173477658",
+ "XmlDocSummary": "Fluid barrels vary depending on what is being measured and where. In the US most fluid barrels (apart from oil) are 31.5 US gallons (26 imp gal; 119 L) (half a hogshead), but a beer barrel is 31 US gallons (26 imp gal; 117 L).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Barrel_(unit)#Fluid_barrel_in_the_US_and_UK",
+ "FromUnitToBaseFunc": "{x} * 0.117347765304",
+ "FromBaseToUnitFunc": "{x} / 0.117347765304",
"Localization": [
{
"Culture": "en-US",
@@ -440,6 +502,8 @@
{
"SingularName": "ImperialBeerBarrel",
"PluralName": "ImperialBeerBarrels",
+ "XmlDocSummary": "Fluid barrels vary depending on what is being measured and where. In the UK a beer barrel is 36 imperial gallons (43 US gal; ~164 L).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Barrel_(unit)#Fluid_barrel_in_the_US_and_UK",
"FromUnitToBaseFunc": "{x} * 0.16365924",
"FromBaseToUnitFunc": "{x} / 0.16365924",
"Localization": [
@@ -452,6 +516,8 @@
{
"SingularName": "UsQuart",
"PluralName": "UsQuarts",
+ "XmlDocSummary": "The US liquid quart equals 57.75 cubic inches, which is exactly equal to 0.946352946 L.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Quart#US_liquid_quart",
"FromUnitToBaseFunc": "{x} * 9.46352946e-4",
"FromBaseToUnitFunc": "{x} / 9.46352946e-4",
"Localization": [
@@ -464,6 +530,8 @@
{
"SingularName": "ImperialQuart",
"PluralName": "ImperialQuarts",
+ "XmlDocSummary": "The imperial quart, which is used for both liquid and dry capacity, is equal to one quarter of an imperial gallon, or exactly 1.1365225 liters.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Quart#Imperial_quart",
"FromUnitToBaseFunc": "{x} * 1.1365225e-3",
"FromBaseToUnitFunc": "{x} / 1.1365225e-3",
"Localization": [
@@ -476,6 +544,8 @@
{
"SingularName": "UsPint",
"PluralName": "UsPints",
+ "XmlDocSummary": "The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Pint#US_liquid_pint",
"FromUnitToBaseFunc": "{x} * 4.73176473e-4",
"FromBaseToUnitFunc": "{x} / 4.73176473e-4",
"Localization": [
@@ -488,8 +558,10 @@
{
"SingularName": "AcreFoot",
"PluralName": "AcreFeet",
- "FromUnitToBaseFunc": "{x} / 0.000810714",
- "FromBaseToUnitFunc": "{x} * 0.000810714",
+ "XmlDocSummary": "An acre-foot is 43,560 cubic feet (~1,233.5 m3).",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Acre-foot",
+ "FromUnitToBaseFunc": "{x} * 1233.48183754752",
+ "FromBaseToUnitFunc": "{x} / 1233.48183754752",
"Localization": [
{
"Culture": "en-US",
@@ -500,9 +572,8 @@
{
"SingularName": "ImperialPint",
"PluralName": "ImperialPints",
- "BaseUnits": {
- "L": "Decimeter"
- },
+ "XmlDocSummary": "The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Pint#Imperial_pint",
"FromUnitToBaseFunc": "{x} * 5.6826125e-4",
"FromBaseToUnitFunc": "{x} / 5.6826125e-4",
"Localization": [
@@ -515,8 +586,10 @@
{
"SingularName": "BoardFoot",
"PluralName": "BoardFeet",
- "FromUnitToBaseFunc": "{x} * 2.3597372158e-3",
- "FromBaseToUnitFunc": "{x} / 2.3597372158e-3",
+ "XmlDocSummary": "The board foot or board-foot is a unit of measurement for the volume of lumber in the United States and Canada. It equals the volume of a board that is one-foot (305 mm) in length, one-foot (305 mm) in width, and one-inch (25.4 mm) in thickness.",
+ "XmlDocRemarks": "https://en.wikipedia.org/wiki/Board_foot",
+ "FromUnitToBaseFunc": "{x} * (0.028316846592 / 12)",
+ "FromBaseToUnitFunc": "{x} / (0.028316846592 / 12)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/VolumeConcentration.json b/Common/UnitDefinitions/VolumeConcentration.json
index d72be50504..4cb5f09795 100644
--- a/Common/UnitDefinitions/VolumeConcentration.json
+++ b/Common/UnitDefinitions/VolumeConcentration.json
@@ -17,7 +17,7 @@
]
},
{
- "SingularName": "LitersPerLiter",
+ "SingularName": "LiterPerLiter",
"PluralName": "LitersPerLiter",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
@@ -25,20 +25,20 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "L/L" ]
+ "Abbreviations": [ "l/l" ]
}
]
},
{
- "SingularName": "LitersPerMililiter",
- "PluralName": "LitersPerMililiter",
+ "SingularName": "LiterPerMilliliter",
+ "PluralName": "LitersPerMilliliter",
"FromUnitToBaseFunc": "{x} / 1e-3",
"FromBaseToUnitFunc": "{x} * 1e-3",
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "L/mL" ]
+ "Abbreviations": [ "l/ml" ]
}
]
},
diff --git a/Common/UnitDefinitions/VolumeFlow.json b/Common/UnitDefinitions/VolumeFlow.json
index e824e590f4..0df447b2b5 100644
--- a/Common/UnitDefinitions/VolumeFlow.json
+++ b/Common/UnitDefinitions/VolumeFlow.json
@@ -10,6 +10,10 @@
{
"SingularName": "CubicMeterPerSecond",
"PluralName": "CubicMetersPerSecond",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
@@ -26,6 +30,10 @@
{
"SingularName": "CubicMeterPerMinute",
"PluralName": "CubicMetersPerMinute",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
@@ -42,6 +50,10 @@
{
"SingularName": "CubicMeterPerHour",
"PluralName": "CubicMetersPerHour",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Hour"
+ },
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
@@ -58,6 +70,10 @@
{
"SingularName": "CubicMeterPerDay",
"PluralName": "CubicMetersPerDay",
+ "BaseUnits": {
+ "L": "Meter",
+ "T": "Day"
+ },
"FromUnitToBaseFunc": "{x} / 86400",
"FromBaseToUnitFunc": "{x} * 86400",
"Localization": [
@@ -70,8 +86,12 @@
{
"SingularName": "CubicFootPerSecond",
"PluralName": "CubicFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 35.314666721",
- "FromBaseToUnitFunc": "{x} * 35.314666721",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Second"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592",
+ "FromBaseToUnitFunc": "{x} / 0.028316846592",
"Localization": [
{
"Culture": "en-US",
@@ -82,8 +102,12 @@
{
"SingularName": "CubicFootPerMinute",
"PluralName": "CubicFeetPerMinute",
- "FromUnitToBaseFunc": "{x} / 2118.88000326",
- "FromBaseToUnitFunc": "{x} * 2118.88000326",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Minute"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.028316846592 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -94,8 +118,12 @@
{
"SingularName": "CubicFootPerHour",
"PluralName": "CubicFeetPerHour",
- "FromUnitToBaseFunc": "{x} * 7.8657907199999087346816086183876e-6",
- "FromBaseToUnitFunc": "{x} / 7.8657907199999087346816086183876e-6",
+ "BaseUnits": {
+ "L": "Foot",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.028316846592 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.028316846592 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -118,8 +146,12 @@
{
"SingularName": "CubicYardPerMinute",
"PluralName": "CubicYardsPerMinute",
- "FromUnitToBaseFunc": "{x} * 0.0127425809664",
- "FromBaseToUnitFunc": "{x} / 0.0127425809664",
+ "BaseUnits": {
+ "L": "Yard",
+ "T": "Minute"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.764554857984 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.764554857984 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -130,8 +162,12 @@
{
"SingularName": "CubicYardPerHour",
"PluralName": "CubicYardsPerHour",
- "FromUnitToBaseFunc": "{x} * 2.1237634944E-4",
- "FromBaseToUnitFunc": "{x} / 2.1237634944E-4",
+ "BaseUnits": {
+ "L": "Yard",
+ "T": "Hour"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.764554857984 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.764554857984 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -142,8 +178,12 @@
{
"SingularName": "CubicYardPerDay",
"PluralName": "CubicYardsPerDay",
- "FromUnitToBaseFunc": "{x} / 113007",
- "FromBaseToUnitFunc": "{x} * 113007",
+ "BaseUnits": {
+ "L": "Yard",
+ "T": "Day"
+ },
+ "FromUnitToBaseFunc": "{x} * 0.764554857984 / 86400",
+ "FromBaseToUnitFunc": "{x} / (0.764554857984 / 86400)",
"Localization": [
{
"Culture": "en-US",
@@ -154,8 +194,8 @@
{
"SingularName": "MillionUsGallonPerDay",
"PluralName": "MillionUsGallonsPerDay",
- "FromUnitToBaseFunc": "{x} / 22.824465227",
- "FromBaseToUnitFunc": "{x} * 22.824465227",
+ "FromUnitToBaseFunc": "{x} * 1e6 * 0.003785411784 / 86400",
+ "FromBaseToUnitFunc": "{x} / (1e6 * 0.003785411784 / 86400)",
"Localization": [
{
"Culture": "en-US",
@@ -166,8 +206,8 @@
{
"SingularName": "UsGallonPerDay",
"PluralName": "UsGallonsPerDay",
- "FromUnitToBaseFunc": "{x} / 22824465.227",
- "FromBaseToUnitFunc": "{x} * 22824465.227",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784 / 86400",
+ "FromBaseToUnitFunc": "{x} / (0.003785411784 / 86400)",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -185,7 +225,7 @@
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "L/s", "LPS" ]
+ "Abbreviations": [ "l/s", "LPS" ]
},
{
"Culture": "ru-RU",
@@ -196,13 +236,13 @@
{
"SingularName": "LiterPerMinute",
"PluralName": "LitersPerMinute",
- "FromUnitToBaseFunc": "{x} / 60000.00000",
- "FromBaseToUnitFunc": "{x} * 60000.00000",
+ "FromUnitToBaseFunc": "{x} / (1000 * 60)",
+ "FromBaseToUnitFunc": "{x} * (1000 * 60)",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "L/min", "LPM" ]
+ "Abbreviations": [ "l/min", "LPM" ]
},
{
"Culture": "ru-RU",
@@ -213,13 +253,13 @@
{
"SingularName": "LiterPerHour",
"PluralName": "LitersPerHour",
- "FromUnitToBaseFunc": "{x} / 3600000.000",
- "FromBaseToUnitFunc": "{x} * 3600000.000",
+ "FromUnitToBaseFunc": "{x} / (1000 * 3600)",
+ "FromBaseToUnitFunc": "{x} * (1000 * 3600)",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "L/h", "LPH" ]
+ "Abbreviations": [ "l/h", "LPH" ]
},
{
"Culture": "ru-RU",
@@ -230,21 +270,21 @@
{
"SingularName": "LiterPerDay",
"PluralName": "LitersPerDay",
- "FromUnitToBaseFunc": "{x} / 86400000",
- "FromBaseToUnitFunc": "{x} * 86400000",
+ "FromUnitToBaseFunc": "{x} / (1000 * 86400)",
+ "FromBaseToUnitFunc": "{x} * (1000 * 86400)",
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "l/day", "L/d", "LPD" ]
+ "Abbreviations": [ "l/day", "l/d", "LPD" ]
}
]
},
{
"SingularName": "UsGallonPerSecond",
"PluralName": "UsGallonsPerSecond",
- "FromUnitToBaseFunc": "{x} / 264.1720523581484",
- "FromBaseToUnitFunc": "{x} * 264.1720523581484",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784",
+ "FromBaseToUnitFunc": "{x} / 0.003785411784",
"Localization": [
{
"Culture": "en-US",
@@ -255,8 +295,8 @@
{
"SingularName": "UsGallonPerMinute",
"PluralName": "UsGallonsPerMinute",
- "FromUnitToBaseFunc": "{x} / 15850.323141489",
- "FromBaseToUnitFunc": "{x} * 15850.323141489",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.003785411784 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -267,8 +307,8 @@
{
"SingularName": "UkGallonPerDay",
"PluralName": "UkGallonsPerDay",
- "FromUnitToBaseFunc": "{x} / 19005304",
- "FromBaseToUnitFunc": "{x} * 19005304",
+ "FromUnitToBaseFunc": "{x} * 0.00454609 / 86400",
+ "FromBaseToUnitFunc": "{x} / (0.00454609 / 86400)",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -280,8 +320,8 @@
{
"SingularName": "UkGallonPerHour",
"PluralName": "UkGallonsPerHour",
- "FromUnitToBaseFunc": "{x} / 791887.667",
- "FromBaseToUnitFunc": "{x} * 791887.667",
+ "FromUnitToBaseFunc": "{x} * 0.00454609 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.00454609 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -292,8 +332,8 @@
{
"SingularName": "UkGallonPerMinute",
"PluralName": "UkGallonsPerMinute",
- "FromUnitToBaseFunc": "{x} / 13198.2",
- "FromBaseToUnitFunc": "{x} * 13198.2",
+ "FromUnitToBaseFunc": "{x} * 0.00454609 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.00454609 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -304,8 +344,8 @@
{
"SingularName": "UkGallonPerSecond",
"PluralName": "UkGallonsPerSecond",
- "FromUnitToBaseFunc": "{x} / 219.969",
- "FromBaseToUnitFunc": "{x} * 219.969",
+ "FromUnitToBaseFunc": "{x} * 0.00454609",
+ "FromBaseToUnitFunc": "{x} / 0.00454609",
"Prefixes": [ "Mega" ],
"Localization": [
{
@@ -317,8 +357,8 @@
{
"SingularName": "KilousGallonPerMinute",
"PluralName": "KilousGallonsPerMinute",
- "FromUnitToBaseFunc": "{x} / 15.850323141489",
- "FromBaseToUnitFunc": "{x} * 15.850323141489",
+ "FromUnitToBaseFunc": "{x} * 1000 * 0.003785411784 / 60",
+ "FromBaseToUnitFunc": "{x} / (1000 * 0.003785411784 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -329,8 +369,8 @@
{
"SingularName": "UsGallonPerHour",
"PluralName": "UsGallonsPerHour",
- "FromUnitToBaseFunc": "{x} / 951019.38848933424",
- "FromBaseToUnitFunc": "{x} * 951019.38848933424",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.003785411784 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -341,6 +381,10 @@
{
"SingularName": "CubicDecimeterPerMinute",
"PluralName": "CubicDecimetersPerMinute",
+ "BaseUnits": {
+ "L": "Decimeter",
+ "T": "Minute"
+ },
"FromUnitToBaseFunc": "{x} / 60000.00000",
"FromBaseToUnitFunc": "{x} * 60000.00000",
"Localization": [
@@ -357,8 +401,8 @@
{
"SingularName": "OilBarrelPerDay",
"PluralName": "OilBarrelsPerDay",
- "FromUnitToBaseFunc": "{x} * 1.8401307283333333333333333333333e-6",
- "FromBaseToUnitFunc": "{x} / 1.8401307283333333333333333333333e-6",
+ "FromUnitToBaseFunc": "{x} * 0.158987294928 / 86400",
+ "FromBaseToUnitFunc": "{x} / (0.158987294928 / 86400)",
"Localization": [
{
"Culture": "en-US",
@@ -369,8 +413,8 @@
{
"SingularName": "OilBarrelPerMinute",
"PluralName": "OilBarrelsPerMinute",
- "FromUnitToBaseFunc": "{x} * 2.64978825e-3",
- "FromBaseToUnitFunc": "{x} / 2.64978825e-3",
+ "FromUnitToBaseFunc": "{x} * 0.158987294928 / 60",
+ "FromBaseToUnitFunc": "{x} / (0.158987294928 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -381,8 +425,8 @@
{
"SingularName": "OilBarrelPerHour",
"PluralName": "OilBarrelsPerHour",
- "FromUnitToBaseFunc": "{x} * 4.41631375e-5",
- "FromBaseToUnitFunc": "{x} / 4.41631375e-5",
+ "FromUnitToBaseFunc": "{x} * 0.158987294928 / 3600",
+ "FromBaseToUnitFunc": "{x} / (0.158987294928 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -393,8 +437,8 @@
{
"SingularName": "OilBarrelPerSecond",
"PluralName": "OilBarrelsPerSecond",
- "FromUnitToBaseFunc": "{x} / 6.28981",
- "FromBaseToUnitFunc": "{x} * 6.28981",
+ "FromUnitToBaseFunc": "{x} * 0.158987294928",
+ "FromBaseToUnitFunc": "{x} / 0.158987294928",
"Localization": [
{
"Culture": "en-US",
@@ -405,6 +449,10 @@
{
"SingularName": "CubicMillimeterPerSecond",
"PluralName": "CubicMillimetersPerSecond",
+ "BaseUnits": {
+ "L": "Millimeter",
+ "T": "Second"
+ },
"FromUnitToBaseFunc": "{x} * 1e-9",
"FromBaseToUnitFunc": "{x} / 1e-9",
"Localization": [
@@ -421,8 +469,8 @@
{
"SingularName": "AcreFootPerSecond",
"PluralName": "AcreFeetPerSecond",
- "FromUnitToBaseFunc": "{x} / 0.000810713194",
- "FromBaseToUnitFunc": "{x} * 0.000810713194",
+ "FromUnitToBaseFunc": "{x} * 1233.48183754752",
+ "FromBaseToUnitFunc": "{x} / 1233.48183754752",
"Localization": [
{
"Culture": "en-US",
@@ -433,8 +481,8 @@
{
"SingularName": "AcreFootPerMinute",
"PluralName": "AcreFeetPerMinute",
- "FromUnitToBaseFunc": "{x} / 0.0486427916",
- "FromBaseToUnitFunc": "{x} * 0.0486427916",
+ "FromUnitToBaseFunc": "{x} * 1233.48183754752 / 60",
+ "FromBaseToUnitFunc": "{x} / (1233.48183754752 / 60)",
"Localization": [
{
"Culture": "en-US",
@@ -445,8 +493,8 @@
{
"SingularName": "AcreFootPerHour",
"PluralName": "AcreFeetPerHour",
- "FromUnitToBaseFunc": "{x} / 2.91857",
- "FromBaseToUnitFunc": "{x} * 2.91857",
+ "FromUnitToBaseFunc": "{x} * 1233.48183754752 / 3600",
+ "FromBaseToUnitFunc": "{x} / (1233.48183754752 / 3600)",
"Localization": [
{
"Culture": "en-US",
@@ -457,8 +505,8 @@
{
"SingularName": "AcreFootPerDay",
"PluralName": "AcreFeetPerDay",
- "FromUnitToBaseFunc": "{x} / 70.0457",
- "FromBaseToUnitFunc": "{x} * 70.0457",
+ "FromUnitToBaseFunc": "{x} * 1233.48183754752 / 86400",
+ "FromBaseToUnitFunc": "{x} / (1233.48183754752 / 86400)",
"Localization": [
{
"Culture": "en-US",
@@ -469,8 +517,12 @@
{
"SingularName": "CubicCentimeterPerMinute",
"PluralName": "CubicCentimetersPerMinute",
- "FromUnitToBaseFunc": "{x} * 1.6666666666667e-8",
- "FromBaseToUnitFunc": "{x} / 1.6666666666667e-8",
+ "BaseUnits": {
+ "L": "Centimeter",
+ "T": "Minute"
+ },
+ "FromUnitToBaseFunc": "{x} * 1e-6 / 60",
+ "FromBaseToUnitFunc": "{x} / (1e-6 / 60)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/VolumeFlowPerArea.json b/Common/UnitDefinitions/VolumeFlowPerArea.json
index 0e015027d0..4ca48a9994 100644
--- a/Common/UnitDefinitions/VolumeFlowPerArea.json
+++ b/Common/UnitDefinitions/VolumeFlowPerArea.json
@@ -31,8 +31,8 @@
"T": "Minute"
},
- "FromUnitToBaseFunc": "{x} / 196.850394",
- "FromBaseToUnitFunc": "{x} * 196.850394",
+ "FromUnitToBaseFunc": "{x} * (0.028316846592 / 60) / 9.290304e-2",
+ "FromBaseToUnitFunc": "{x} * 9.290304e-2 / (0.028316846592 / 60)",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/VolumePerLength.json b/Common/UnitDefinitions/VolumePerLength.json
index c436ca013f..96c4e0e5c1 100644
--- a/Common/UnitDefinitions/VolumePerLength.json
+++ b/Common/UnitDefinitions/VolumePerLength.json
@@ -67,8 +67,8 @@
{
"SingularName": "OilBarrelPerFoot",
"PluralName": "OilBarrelsPerFoot",
- "FromUnitToBaseFunc": "{x} / 1.91713408",
- "FromBaseToUnitFunc": "{x} * 1.91713408",
+ "FromUnitToBaseFunc": "{x} * 0.158987294928 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / 0.158987294928",
"Prefixes": [],
"Localization": [
{
@@ -80,8 +80,8 @@
{
"SingularName": "CubicYardPerFoot",
"PluralName": "CubicYardsPerFoot",
- "FromUnitToBaseFunc": "{x} * 2.50838208",
- "FromBaseToUnitFunc": "{x} / 2.50838208",
+ "FromUnitToBaseFunc": "{x} * 0.764554857984 / 0.3048",
+ "FromBaseToUnitFunc": "{x} * 0.3048 / 0.764554857984",
"Localization": [
{
"Culture": "en-US",
@@ -92,8 +92,8 @@
{
"SingularName": "CubicYardPerUsSurveyFoot",
"PluralName": "CubicYardsPerUsSurveyFoot",
- "FromUnitToBaseFunc": "{x} * 2.50837706323584",
- "FromBaseToUnitFunc": "{x} / 2.50837706323584",
+ "FromUnitToBaseFunc": "{x} * 0.764554857984 * 3937 / 1200",
+ "FromBaseToUnitFunc": "{x} * 1200 / (0.764554857984 * 3937)",
"Localization": [
{
"Culture": "en-US",
@@ -104,8 +104,8 @@
{
"SingularName": "UsGallonPerMile",
"PluralName": "UsGallonsPerMile",
- "FromUnitToBaseFunc": "{x} / (1000 * 1609.344 / 3.785411784)",
- "FromBaseToUnitFunc": "{x} * (1000 * 1609.344 / 3.785411784)",
+ "FromUnitToBaseFunc": "{x} * 0.003785411784 / 1609.344",
+ "FromBaseToUnitFunc": "{x} * 1609.344 / 0.003785411784",
"Localization": [
{
"Culture": "en-US",
@@ -116,8 +116,8 @@
{
"SingularName": "ImperialGallonPerMile",
"PluralName": "ImperialGallonsPerMile",
- "FromUnitToBaseFunc": "{x} / (1000 * 1609.344 / 4.54609)",
- "FromBaseToUnitFunc": "{x} * (1000 * 1609.344 / 4.54609)",
+ "FromUnitToBaseFunc": "{x} * 0.00454609 / 1609.344",
+ "FromBaseToUnitFunc": "{x} * 1609.344 / 0.00454609",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitDefinitions/VolumetricHeatCapacity.json b/Common/UnitDefinitions/VolumetricHeatCapacity.json
index 0beebc41bd..08a9d02103 100644
--- a/Common/UnitDefinitions/VolumetricHeatCapacity.json
+++ b/Common/UnitDefinitions/VolumetricHeatCapacity.json
@@ -13,51 +13,64 @@
{
"SingularName": "JoulePerCubicMeterKelvin",
"PluralName": "JoulesPerCubicMeterKelvin",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "Kelvin"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "J/m³·K" ]
+ "Abbreviations": [ "J/(m³·K)" ]
}
]
},
{
"SingularName": "JoulePerCubicMeterDegreeCelsius",
"PluralName": "JoulesPerCubicMeterDegreeCelsius",
+ "BaseUnits": {
+ "M": "Kilogram",
+ "L": "Meter",
+ "T": "Second",
+ "Θ": "DegreeCelsius"
+ },
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [ "Kilo", "Mega" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "J/m³·°C" ]
+ "Abbreviations": [ "J/(m³·°C)" ]
}
]
},
{
"SingularName": "CaloriePerCubicCentimeterDegreeCelsius",
"PluralName": "CaloriesPerCubicCentimeterDegreeCelsius",
- "FromUnitToBaseFunc": "{x} / 2.388459e-7",
- "FromBaseToUnitFunc": "{x} * 2.388459e-7",
+ "FromUnitToBaseFunc": "{x} * 4.184e6",
+ "FromBaseToUnitFunc": "{x} / 4.184e6",
"Prefixes": [ "Kilo" ],
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "cal/cm³·°C" ]
+ "Abbreviations": [ "cal/(cm³·°C)" ]
}
]
},
{
"SingularName": "BtuPerCubicFootDegreeFahrenheit",
"PluralName": "BtusPerCubicFootDegreeFahrenheit",
- "FromUnitToBaseFunc": "{x} / 1.4910660e-5",
- "FromBaseToUnitFunc": "{x} * 1.4910660e-5",
+ "XmlDocRemarks": "Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.",
+ "FromUnitToBaseFunc": "{x} * (1055.05585262 / 0.028316846592) * 1.8",
+ "FromBaseToUnitFunc": "{x} / ((1055.05585262 / 0.028316846592) * 1.8)",
"Localization": [
{
"Culture": "en-US",
- "Abbreviations": [ "BTU/ft³·°F" ]
+ "Abbreviations": [ "BTU/(ft³·°F)" ]
}
]
}
diff --git a/Common/UnitDefinitions/WarpingMomentOfInertia.json b/Common/UnitDefinitions/WarpingMomentOfInertia.json
index 8142bc641d..dddb9188d6 100644
--- a/Common/UnitDefinitions/WarpingMomentOfInertia.json
+++ b/Common/UnitDefinitions/WarpingMomentOfInertia.json
@@ -72,8 +72,8 @@
"BaseUnits": {
"L": "Foot"
},
- "FromUnitToBaseFunc": "{x} * Math.Pow(0.3048, 6)",
- "FromBaseToUnitFunc": "{x} / Math.Pow(0.3048, 6)",
+ "FromUnitToBaseFunc": "{x} * 0.000801843800914862014464",
+ "FromBaseToUnitFunc": "{x} / 0.000801843800914862014464",
"Localization": [
{
"Culture": "en-US",
@@ -87,8 +87,8 @@
"BaseUnits": {
"L": "Inch"
},
- "FromUnitToBaseFunc": "{x} * Math.Pow(2.54e-2, 6)",
- "FromBaseToUnitFunc": "{x} / Math.Pow(2.54e-2, 6)",
+ "FromUnitToBaseFunc": "{x} * 0.000000000268535866540096",
+ "FromBaseToUnitFunc": "{x} / 0.000000000268535866540096",
"Localization": [
{
"Culture": "en-US",
diff --git a/Common/UnitEnumValues.g.json b/Common/UnitEnumValues.g.json
index 61e715b277..ca73979277 100644
--- a/Common/UnitEnumValues.g.json
+++ b/Common/UnitEnumValues.g.json
@@ -67,19 +67,6 @@
"Revolution": 15,
"Tilt": 16
},
- "ApparentEnergy": {
- "KilovoltampereHour": 1,
- "MegavoltampereHour": 2,
- "VoltampereHour": 3
- },
- "ApparentPower": {
- "Gigavoltampere": 1,
- "Kilovoltampere": 2,
- "Megavoltampere": 3,
- "Voltampere": 4,
- "Microvoltampere": 6,
- "Millivoltampere": 7
- },
"Area": {
"Acre": 1,
"Hectare": 2,
@@ -142,15 +129,6 @@
"KilogramPerJoule": 2,
"PoundPerMechanicalHorsepowerHour": 3
},
- "Capacitance": {
- "Farad": 1,
- "Kilofarad": 2,
- "Megafarad": 3,
- "Microfarad": 4,
- "Millifarad": 5,
- "Nanofarad": 6,
- "Picofarad": 7
- },
"CoefficientOfThermalExpansion": {
"InverseDegreeCelsius": 1,
"InverseDegreeFahrenheit": 2,
@@ -358,13 +336,6 @@
"Volt": 5,
"Nanovolt": 11
},
- "ElectricPotentialAc": {
- "KilovoltAc": 1,
- "MegavoltAc": 2,
- "MicrovoltAc": 3,
- "MillivoltAc": 4,
- "VoltAc": 5
- },
"ElectricPotentialChangeRate": {
"KilovoltPerHour": 1,
"KilovoltPerMicrosecond": 2,
@@ -387,13 +358,6 @@
"VoltPerMinute": 19,
"VoltPerSecond": 20
},
- "ElectricPotentialDc": {
- "KilovoltDc": 1,
- "MegavoltDc": 2,
- "MicrovoltDc": 3,
- "MillivoltDc": 4,
- "VoltDc": 5
- },
"ElectricResistance": {
"Gigaohm": 1,
"Kiloohm": 2,
@@ -985,11 +949,11 @@
"KilotonneSquareCentimeter": 9,
"KilotonneSquareDecimeter": 10,
"KilotonneSquareMeter": 11,
- "KilotonneSquareMilimeter": 12,
+ "KilotonneSquareMillimeter": 12,
"MegatonneSquareCentimeter": 13,
"MegatonneSquareDecimeter": 14,
"MegatonneSquareMeter": 15,
- "MegatonneSquareMilimeter": 16,
+ "MegatonneSquareMillimeter": 16,
"MilligramSquareCentimeter": 17,
"MilligramSquareDecimeter": 18,
"MilligramSquareMeter": 19,
@@ -1001,7 +965,7 @@
"TonneSquareCentimeter": 25,
"TonneSquareDecimeter": 26,
"TonneSquareMeter": 27,
- "TonneSquareMilimeter": 28
+ "TonneSquareMillimeter": 28
},
"MolarEnergy": {
"JoulePerMole": 1,
@@ -1226,17 +1190,6 @@
"DecimalFractionPerSecond": 1,
"PercentPerSecond": 2
},
- "ReactiveEnergy": {
- "KilovoltampereReactiveHour": 1,
- "MegavoltampereReactiveHour": 2,
- "VoltampereReactiveHour": 3
- },
- "ReactivePower": {
- "GigavoltampereReactive": 1,
- "KilovoltampereReactive": 2,
- "MegavoltampereReactive": 3,
- "VoltampereReactive": 4
- },
"ReciprocalArea": {
"InverseSquareCentimeter": 1,
"InverseSquareDecimeter": 2,
@@ -1378,9 +1331,9 @@
"MegajoulePerKilogramKelvin": 9
},
"SpecificFuelConsumption": {
- "GramPerKiloNewtonSecond": 1,
+ "GramPerKilonewtonSecond": 1,
"KilogramPerKilogramForceHour": 2,
- "KilogramPerKiloNewtonSecond": 3,
+ "KilogramPerKilonewtonSecond": 3,
"PoundMassPerPoundForceHour": 4
},
"SpecificVolume": {
@@ -1626,26 +1579,26 @@
"ImperialQuart": 57
},
"VolumeConcentration": {
- "CentilitersPerLiter": 1,
- "CentilitersPerMililiter": 2,
- "DecilitersPerLiter": 3,
- "DecilitersPerMililiter": 4,
+ "CentiliterPerLiter": 1,
+ "CentiliterPerMilliliter": 2,
+ "DeciliterPerLiter": 3,
+ "DeciliterPerMilliliter": 4,
"DecimalFraction": 5,
- "LitersPerLiter": 6,
- "LitersPerMililiter": 7,
- "MicrolitersPerLiter": 8,
- "MicrolitersPerMililiter": 9,
- "MillilitersPerLiter": 10,
- "MillilitersPerMililiter": 11,
- "NanolitersPerLiter": 12,
- "NanolitersPerMililiter": 13,
+ "LiterPerLiter": 6,
+ "LiterPerMilliliter": 7,
+ "MicroliterPerLiter": 8,
+ "MicroliterPerMilliliter": 9,
+ "MilliliterPerLiter": 10,
+ "MilliliterPerMilliliter": 11,
+ "NanoliterPerLiter": 12,
+ "NanoliterPerMilliliter": 13,
"PartPerBillion": 14,
"PartPerMillion": 15,
"PartPerThousand": 16,
"PartPerTrillion": 17,
"Percent": 18,
- "PicolitersPerLiter": 19,
- "PicolitersPerMililiter": 20
+ "PicoliterPerLiter": 19,
+ "PicoliterPerMilliliter": 20
},
"VolumeFlow": {
"AcreFootPerDay": 1,
@@ -1928,27 +1881,6 @@
"MilligraySquareMeter": 11,
"MilligraySquareMillimeter": 12
},
- "FluidResistance": {
- "DyneSecondPerCentimeterToTheFifth": 6,
- "MegapascalSecondPerCubicMeter": 7,
- "MillimeterMercuryMinutePerCubicCentimeter": 3,
- "MillimeterMercuryMinutePerCubicMeter": 5,
- "MillimeterMercuryMinutePerLiter": 2,
- "MillimeterMercuryMinutePerMilliliter": 9,
- "MillimeterMercurySecondPerCubicCentimeter": 8,
- "MillimeterMercurySecondPerCubicMeter": 10,
- "MillimeterMercurySecondPerLiter": 4,
- "MillimeterMercurySecondPerMilliliter": 1,
- "PascalMinutePerCubicCentimeter": 19,
- "PascalMinutePerCubicMeter": 16,
- "PascalMinutePerLiter": 15,
- "PascalMinutePerMilliliter": 12,
- "PascalSecondPerCubicCentimeter": 18,
- "PascalSecondPerCubicMeter": 13,
- "PascalSecondPerLiter": 11,
- "PascalSecondPerMilliliter": 20,
- "WoodUnit": 17
- },
"ElectricApparentEnergy": {
"KilovoltampereHour": 7,
"MegavoltampereHour": 3,
@@ -2019,5 +1951,34 @@
"Nanoohm": 7,
"Ohm": 6,
"Teraohm": 5
+ },
+ "FluidResistance": {
+ "DyneSecondPerCentimeterToTheFifth": 6,
+ "MegapascalSecondPerCubicMeter": 7,
+ "MillimeterMercuryMinutePerCubicCentimeter": 3,
+ "MillimeterMercuryMinutePerCubicMeter": 5,
+ "MillimeterMercuryMinutePerLiter": 2,
+ "MillimeterMercuryMinutePerMilliliter": 9,
+ "MillimeterMercurySecondPerCubicCentimeter": 8,
+ "MillimeterMercurySecondPerCubicMeter": 10,
+ "MillimeterMercurySecondPerLiter": 4,
+ "MillimeterMercurySecondPerMilliliter": 1,
+ "PascalMinutePerCubicCentimeter": 19,
+ "PascalMinutePerCubicMeter": 16,
+ "PascalMinutePerLiter": 15,
+ "PascalMinutePerMilliliter": 12,
+ "PascalSecondPerCubicCentimeter": 18,
+ "PascalSecondPerCubicMeter": 13,
+ "PascalSecondPerLiter": 11,
+ "PascalSecondPerMilliliter": 20,
+ "WoodUnit": 17
+ },
+ "ThermalInsulance": {
+ "HourSquareFeetDegreeFahrenheitPerBtu": 2,
+ "SquareCentimeterHourDegreeCelsiusPerKilocalorie": 6,
+ "SquareCentimeterKelvinPerWatt": 7,
+ "SquareMeterDegreeCelsiusPerWatt": 3,
+ "SquareMeterKelvinPerKilowatt": 5,
+ "SquareMeterKelvinPerWatt": 4
}
}
diff --git a/Common/UnitRelations.json b/Common/UnitRelations.json
new file mode 100644
index 0000000000..bded89653c
--- /dev/null
+++ b/Common/UnitRelations.json
@@ -0,0 +1,85 @@
+[
+ "1 = Area.SquareMeter * ReciprocalArea.InverseSquareMeter",
+ "1 = Density.KilogramPerCubicMeter * SpecificVolume.CubicMeterPerKilogram",
+ "1 = ElectricResistivity.OhmMeter * ElectricConductivity.SiemensPerMeter",
+ "1 = Length.Meter * ReciprocalLength.InverseMeter",
+ "Acceleration.MeterPerSecondSquared = Jerk.MeterPerSecondCubed * Duration.Second",
+ "AmountOfSubstance.Mole = MolarFlow.MolePerSecond * Duration.Second",
+ "AmountOfSubstance.Mole = Molarity.MolePerCubicMeter * Volume.CubicMeter",
+ "Angle.Radian = RotationalSpeed.RadianPerSecond * Duration.Second",
+ "Area.SquareMeter = KinematicViscosity.SquareMeterPerSecond * Duration.Second -- NoInferredDivision",
+ "Area.SquareMeter = Length.Meter * Length.Meter",
+ "Area.SquareMeter = Volume.CubicMeter * ReciprocalLength.InverseMeter",
+ "AreaMomentOfInertia.MeterToTheFourth = Volume.CubicMeter * Length.Meter",
+ "double = SpecificEnergy.JoulePerKilogram * BrakeSpecificFuelConsumption.KilogramPerJoule",
+ "DynamicViscosity.NewtonSecondPerMeterSquared = Density.KilogramPerCubicMeter * KinematicViscosity.SquareMeterPerSecond",
+ "ElectricCharge.AmpereHour = ElectricCurrent.Ampere * Duration.Hour",
+ "ElectricCurrent.Ampere = ElectricCurrentGradient.AmperePerSecond * Duration.Second",
+ "ElectricPotential.Volt = ElectricCurrent.Ampere * ElectricResistance.Ohm",
+ "Energy.Joule = ElectricPotential.Volt * ElectricCharge.Coulomb",
+ "Energy.Joule = EnergyDensity.JoulePerCubicMeter * Volume.CubicMeter",
+ "Energy.Joule = MolarEnergy.JoulePerMole * AmountOfSubstance.Mole",
+ "Energy.Joule = Power.Watt * Duration.Second",
+ "Energy.Joule = SpecificEnergy.JoulePerKilogram * Mass.Kilogram",
+ "Energy.Joule = TemperatureDelta.Kelvin * Entropy.JoulePerKelvin",
+ "Entropy.JoulePerKelvin = SpecificEntropy.JoulePerKilogramKelvin * Mass.Kilogram",
+ "Force.Newton = ForceChangeRate.NewtonPerSecond * Duration.Second",
+ "Force.Newton = ForcePerLength.NewtonPerMeter * Length.Meter",
+ "Force.Newton = Mass.Kilogram * Acceleration.MeterPerSecondSquared",
+ "Force.Newton = Pressure.Pascal * Area.SquareMeter",
+ "ForcePerLength.NewtonPerMeter = Force.Newton * ReciprocalLength.InverseMeter",
+ "ForcePerLength.NewtonPerMeter = Pressure.NewtonPerSquareMeter * Length.Meter",
+ "ForcePerLength.NewtonPerMeter = SpecificWeight.NewtonPerCubicMeter * Area.SquareMeter",
+ "KinematicViscosity.SquareMeterPerSecond = Length.Meter * Speed.MeterPerSecond",
+ "Length.Meter = Area.SquareMeter * ReciprocalLength.InverseMeter",
+ "Length.Meter = Speed.MeterPerSecond * Duration.Second",
+ "Length.Meter = Volume.CubicMeter * ReciprocalArea.InverseSquareMeter",
+ "LinearDensity.KilogramPerMeter = Area.SquareMeter * Density.KilogramPerCubicMeter",
+ "LuminousFlux.Lumen = Illuminance.Lux * Area.SquareMeter",
+ "LuminousIntensity.Candela = Luminance.CandelaPerSquareMeter * Area.SquareMeter",
+ "Mass.Kilogram = AmountOfSubstance.Mole * MolarMass.KilogramPerMole",
+ "Mass.Kilogram = AreaDensity.KilogramPerSquareMeter * Area.SquareMeter",
+ "Mass.Kilogram = Density.KilogramPerCubicMeter * Volume.CubicMeter",
+ "Mass.Kilogram = LinearDensity.KilogramPerMeter * Length.Meter",
+ "Mass.Kilogram = MassConcentration.KilogramPerCubicMeter * Volume.CubicMeter -- NoInferredDivision",
+ "Mass.Kilogram = MassFlow.KilogramPerSecond * Duration.Second",
+ "Mass.Kilogram = MassFraction.DecimalFraction * Mass.Kilogram",
+ "MassConcentration.KilogramPerCubicMeter = Molarity.MolePerCubicMeter * MolarMass.KilogramPerMole",
+ "MassConcentration.KilogramPerCubicMeter = VolumeConcentration.DecimalFraction * Density.KilogramPerCubicMeter",
+ "MassFlow.KilogramPerSecond = Area.SquareMeter * MassFlux.KilogramPerSecondPerSquareMeter",
+ "MassFlow.KilogramPerSecond = MolarFlow.KilomolePerSecond * MolarMass.KilogramPerKilomole",
+ "MassFlow.KilogramPerSecond = Power.Watt * BrakeSpecificFuelConsumption.KilogramPerJoule",
+ "MassFlow.KilogramPerSecond = VolumeFlow.CubicMeterPerSecond * Density.KilogramPerCubicMeter",
+ "MassFlux.KilogramPerSecondPerSquareMeter = Speed.MeterPerSecond * Density.KilogramPerCubicMeter",
+ "MolarFlow.MolePerSecond = VolumeFlow.CubicMeterPerSecond * Molarity.MolePerCubicMeter",
+ "Molarity.MolePerCubicMeter = Molarity.MolePerCubicMeter * VolumeConcentration.DecimalFraction",
+ "Power.Watt = ElectricPotential.Volt * ElectricCurrent.Ampere",
+ "Power.Watt = Energy.Joule * Frequency.PerSecond",
+ "Power.Watt = Force.Newton * Speed.MeterPerSecond",
+ "Power.Watt = HeatFlux.WattPerSquareMeter * Area.SquareMeter",
+ "Power.Watt = SpecificEnergy.JoulePerKilogram * MassFlow.KilogramPerSecond",
+ "Power.Watt = Torque.NewtonMeter * RotationalSpeed.RadianPerSecond",
+ "Pressure.NewtonPerSquareMeter = Force.Newton * ReciprocalArea.InverseSquareMeter",
+ "Pressure.NewtonPerSquareMeter = ForcePerLength.NewtonPerMeter * ReciprocalLength.InverseMeter",
+ "Pressure.Pascal = PressureChangeRate.PascalPerSecond * Duration.Second",
+ "Pressure.Pascal = SpecificWeight.NewtonPerCubicMeter * Length.Meter",
+ "RadiationEquivalentDose.Sievert = RadiationEquivalentDoseRate.SievertPerHour * Duration.Hour",
+ "Ratio.DecimalFraction = Area.SquareMeter * ReciprocalArea.InverseSquareMeter -- NoInferredDivision",
+ "Ratio.DecimalFraction = TemperatureDelta.Kelvin * CoefficientOfThermalExpansion.PerKelvin -- NoInferredDivision",
+ "ReciprocalArea.InverseSquareMeter = ReciprocalLength.InverseMeter * ReciprocalLength.InverseMeter",
+ "ReciprocalLength.InverseMeter = Length.Meter * ReciprocalArea.InverseSquareMeter",
+ "RotationalStiffness.NewtonMeterPerRadian = RotationalStiffnessPerLength.NewtonMeterPerRadianPerMeter * Length.Meter",
+ "SpecificEnergy.JoulePerKilogram = SpecificEntropy.JoulePerKilogramKelvin * TemperatureDelta.Kelvin",
+ "SpecificEnergy.JoulePerKilogram = Speed.MeterPerSecond * Speed.MeterPerSecond",
+ "SpecificWeight.NewtonPerCubicMeter = Acceleration.MeterPerSecondSquared * Density.KilogramPerCubicMeter",
+ "Speed.MeterPerSecond = Acceleration.MeterPerSecondSquared * Duration.Second",
+ "TemperatureDelta.DegreeCelsius = TemperatureChangeRate.DegreeCelsiusPerSecond * Duration.Second",
+ "TemperatureDelta.DegreeCelsius = TemperatureGradient.DegreeCelsiusPerKilometer * Length.Kilometer",
+ "Torque.NewtonMeter = ForcePerLength.NewtonPerMeter * Area.SquareMeter",
+ "Torque.NewtonMeter = Length.Meter * Force.Newton",
+ "Torque.NewtonMeter = RotationalStiffness.NewtonMeterPerRadian * Angle.Radian",
+ "Volume.CubicMeter = Length.Meter * Area.SquareMeter",
+ "Volume.CubicMeter = SpecificVolume.CubicMeterPerKilogram * Mass.Kilogram",
+ "Volume.CubicMeter = VolumeFlow.CubicMeterPerSecond * Duration.Second",
+ "VolumeFlow.CubicMeterPerSecond = Area.SquareMeter * Speed.MeterPerSecond"
+]
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index 59cfd13c48..2fa148beba 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -21,8 +21,14 @@
612,618
+
+
+ true
+ snupkg
+
+
-
\ No newline at end of file
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000000..54479369db
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,20 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
\ No newline at end of file
diff --git a/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj b/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj
index 72f0d30d29..c585fb0727 100644
--- a/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj
+++ b/PerfTests/PerfTest_Startup_v4_144_0/PerfTest_Startup_v4_144_0.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj b/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj
index 7627f1bbe4..6e31c36338 100644
--- a/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj
+++ b/PerfTests/PerfTest_Startup_v4_72_0/PerfTest_Startup_v4_72_0.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Samples/Directory.Packages.props b/Samples/Directory.Packages.props
new file mode 100644
index 0000000000..3f24827b01
--- /dev/null
+++ b/Samples/Directory.Packages.props
@@ -0,0 +1,13 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml.cs b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml.cs
index 41c001cc97..9b9bf71e09 100644
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml.cs
+++ b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/App.xaml.cs
@@ -16,7 +16,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
protected override Window CreateShell()
{
- return new MainWindow();
+ return Container.Resolve();
}
}
}
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/Converters/UnitToStringConverter.cs b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/Converters/UnitToStringConverter.cs
index 04dcdb901e..f7f2806f73 100644
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/Converters/UnitToStringConverter.cs
+++ b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/Converters/UnitToStringConverter.cs
@@ -6,7 +6,7 @@
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Markup;
-using CommonServiceLocator;
+using Prism.Ioc;
using UnitsNet;
using WpfMVVMSample.Settings;
@@ -22,7 +22,7 @@ public UnitToStringConverter()
{
if (!DesignerProperties.GetIsInDesignMode(new DependencyObject()))
{
- _settings = ServiceLocator.Current.GetInstance();
+ _settings = Prism.Ioc.ContainerLocator.Container.Resolve();
}
}
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml.cs b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml.cs
index e0d2d6299d..2245d7f9cf 100644
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml.cs
+++ b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindow.xaml.cs
@@ -1,17 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
+using System.Windows;
namespace WpfMVVMSample
{
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindowViewModel.cs b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindowViewModel.cs
index bb9a26aafd..0019962e88 100644
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindowViewModel.cs
+++ b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MainWindowViewModel.cs
@@ -1,14 +1,5 @@
-using Prism.Commands;
-using Prism.Mvvm;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using Prism.Mvvm;
using UnitsNet;
-using UnitsNet.Units;
-using WpfMVVMSample.Converters;
-using WpfMVVMSample.Properties;
using WpfMVVMSample.Settings;
namespace WpfMVVMSample
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MvvmSample.Wpf.csproj b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MvvmSample.Wpf.csproj
index 05e93234d6..cb757e1ceb 100644
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MvvmSample.Wpf.csproj
+++ b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/MvvmSample.Wpf.csproj
@@ -1,163 +1,25 @@
-
-
-
+
- Debug
- AnyCPU
- {B72F9215-70FF-4155-89BC-9A02CC550447}
+ net48
WinExe
WpfMVVMSample
- MvvmSample.Wpf
- v4.8
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
+ false
+ true
+ true
-
- ..\..\packages\Unity.5.8.11\lib\net47\CommonServiceLocator.dll
-
-
- ..\..\packages\Prism.Core.7.1.0.431\lib\net45\Prism.dll
-
-
- ..\..\packages\Prism.Unity.7.1.0.431\lib\net45\Prism.Unity.Wpf.dll
-
-
- ..\..\packages\Prism.Wpf.7.1.0.431\lib\net45\Prism.Wpf.dll
-
-
+
+
+
+
-
- ..\..\packages\System.Configuration.ConfigurationManager.4.5.0\lib\net461\System.Configuration.ConfigurationManager.dll
-
-
-
-
- ..\..\packages\System.Security.AccessControl.4.5.0\lib\net461\System.Security.AccessControl.dll
-
-
- ..\..\packages\System.Security.Permissions.4.5.0\lib\net461\System.Security.Permissions.dll
-
-
- ..\..\packages\System.Security.Principal.Windows.4.5.1\lib\net461\System.Security.Principal.Windows.dll
-
-
- ..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
-
-
- ..\..\packages\Prism.Wpf.7.1.0.431\lib\net45\System.Windows.Interactivity.dll
-
-
-
-
-
-
-
-
- 4.0
-
-
- ..\..\packages\UnitsNet.5.9.0\lib\netstandard2.0\UnitsNet.dll
-
-
- ..\..\packages\Unity.Abstractions.3.3.1\lib\net47\Unity.Abstractions.dll
-
-
- ..\..\packages\Unity.5.8.11\lib\net47\Unity.Configuration.dll
-
-
- ..\..\packages\Unity.Container.5.8.11\lib\net47\Unity.Container.dll
-
-
- ..\..\packages\Unity.5.8.11\lib\net47\Unity.Interception.dll
-
-
- ..\..\packages\Unity.5.8.11\lib\net47\Unity.Interception.Configuration.dll
-
-
- ..\..\packages\Unity.5.8.11\lib\net47\Unity.RegistrationByConvention.dll
-
-
- ..\..\packages\Unity.5.8.11\lib\net47\Unity.ServiceLocation.dll
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
-
- MainWindow.xaml
- Code
-
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
+
-
+
-
\ No newline at end of file
diff --git a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/packages.config b/Samples/MvvmSample.Wpf/MvvmSample.Wpf/packages.config
deleted file mode 100644
index c7e5ee450f..0000000000
--- a/Samples/MvvmSample.Wpf/MvvmSample.Wpf/packages.config
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/Samples.sln b/Samples/Samples.sln
index 2101631750..84ba089fe6 100644
--- a/Samples/Samples.sln
+++ b/Samples/Samples.sln
@@ -9,6 +9,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvvmSample.Wpf", "MvvmSampl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitConverter.Console", "UnitConverter.Console\UnitConverter.Console.csproj", "{B3141011-CEF2-46DE-B3DD-7FECD0D6108C}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Files", "_Files", "{D3B39B9C-CE85-4929-A268-1AEBD945127C}"
+ ProjectSection(SolutionItems) = preProject
+ build.bat = build.bat
+ Directory.Packages.props = Directory.Packages.props
+ msbuild.cmd = msbuild.cmd
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/Samples/UnitConverter.Console/UnitConverter.Console.csproj b/Samples/UnitConverter.Console/UnitConverter.Console.csproj
index 21a2269189..3f3de72140 100644
--- a/Samples/UnitConverter.Console/UnitConverter.Console.csproj
+++ b/Samples/UnitConverter.Console/UnitConverter.Console.csproj
@@ -1,14 +1,14 @@
-
- Exe
- net7.0
- enable
- enable
-
+
+ Exe
+ net8.0
+ enable
+ enable
+
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/App.xaml b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/App.xaml
index 0601f215a0..86dd63140b 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/App.xaml
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/App.xaml
@@ -8,10 +8,8 @@
-
-
-
-
+
+
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs
index d727ec84a3..c2ed86fb67 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/IMainWindowVm.cs
@@ -1,4 +1,4 @@
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Input;
using UnitsNet.Samples.UnitConverter.Wpf.Properties;
@@ -23,8 +23,8 @@ public interface IMainWindowVm : INotifyPropertyChanged
string FromHeader { get; }
string ToHeader { get; }
- decimal FromValue { get; set; }
- decimal ToValue { get; }
+ double FromValue { get; set; }
+ double ToValue { get; }
ICommand SwapCommand { get; }
}
}
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindow.xaml b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindow.xaml
index 26fcdf48f5..81d8491452 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindow.xaml
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindow.xaml
@@ -7,12 +7,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpf="clr-namespace:UnitsNet.Samples.UnitConverter.Wpf"
mc:Ignorable="d"
- Title="UnitsNet - WPF unit converter sample app" Height="350" Width="525"
+ WindowStartupLocation="CenterScreen"
+ Title="UnitsNet - WPF unit converter sample app" Height="800" Width="800"
+ d:DesignHeight="600" d:DesignWidth="600"
d:DataContext="{d:DesignInstance wpf:MainWindowDesignVm, IsDesignTimeCreatable=True}">
+
@@ -29,7 +32,7 @@
SelectionChanged="Selector_OnSelectionChanged" />
-
+
-
+
-
-
-
-
-
-
+
-
-
+
-
+
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs
index 0e2f9d4483..89f47de952 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowDesignVM.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
@@ -30,8 +30,8 @@ public MainWindowDesignVm()
public string FromHeader { get; } = "Value [cm]";
public string ToHeader { get; } = "Result [dm]";
- public decimal FromValue { get; set; } = 14.5m;
- public decimal ToValue { get; } = 1.45m;
+ public double FromValue { get; set; } = 14.5;
+ public double ToValue { get; } = 1.45;
public ICommand SwapCommand { get; } = new RoutedCommand();
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs
index 1abd00b8ea..a959ab87aa 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/MainWindowVM.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -17,7 +17,7 @@ namespace UnitsNet.Samples.UnitConverter.Wpf
public sealed class MainWindowVm : IMainWindowVm
{
private readonly ObservableCollection _units;
- private decimal _fromValue;
+ private double _fromValue;
[CanBeNull] private UnitListItem _selectedFromUnit;
@@ -25,7 +25,7 @@ public sealed class MainWindowVm : IMainWindowVm
[CanBeNull] private UnitListItem _selectedToUnit;
- private decimal _toValue;
+ private double _toValue;
public MainWindowVm()
{
@@ -38,7 +38,7 @@ public MainWindowVm()
FromValue = 1;
SwapCommand = new DelegateCommand(Swap);
- OnSelectedQuantity(Length.Info.Name);
+ SelectedQuantity = Length.Info.Name;
}
public ICommand SwapCommand { get; }
@@ -90,24 +90,22 @@ public UnitListItem SelectedToUnit
public string ToHeader => $"Result [{SelectedToUnit?.Abbreviation}]";
- public decimal FromValue
+ public double FromValue
{
get => _fromValue;
set
{
- if (value == _fromValue) return;
_fromValue = value;
OnPropertyChanged();
UpdateResult();
}
}
- public decimal ToValue
+ public double ToValue
{
get => _toValue;
private set
{
- if (value == _toValue) return;
_toValue = value;
OnPropertyChanged();
}
@@ -118,7 +116,7 @@ private set
private void Swap()
{
UnitListItem oldToUnit = SelectedToUnit;
- decimal oldToValue = ToValue;
+ var oldToValue = ToValue;
// Setting these will change ToValue
SelectedToUnit = SelectedFromUnit;
@@ -131,11 +129,9 @@ private void UpdateResult()
{
if (SelectedFromUnit == null || SelectedToUnit == null) return;
- double convertedValue = UnitsNet.UnitConverter.Convert(FromValue,
+ ToValue = UnitsNet.UnitConverter.Convert(FromValue,
SelectedFromUnit.UnitEnumValue,
SelectedToUnit.UnitEnumValue);
-
- ToValue = Convert.ToDecimal(convertedValue);
}
private void OnSelectedQuantity(string quantityName)
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj
index 46938addba..29bc3a93e2 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitConverter.Wpf.csproj
@@ -1,126 +1,30 @@
-
-
-
+
- Debug
- AnyCPU
- {D04EE35D-496A-4C83-A369-09B9B2BEAEEC}
+ net48
WinExe
UnitsNet.Samples.UnitConverter.Wpf
- UnitConverter.Wpf
- v4.8
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
+ false
+ true
+ true
logo-512.ico
-
- ..\..\packages\ControlzEx.3.0.2.4\lib\net462\ControlzEx.dll
-
-
- ..\..\packages\MahApps.Metro.1.6.5\lib\net47\MahApps.Metro.dll
-
-
-
-
- ..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
-
-
- ..\..\packages\ControlzEx.3.0.2.4\lib\net462\System.Windows.Interactivity.dll
-
-
-
-
-
-
-
-
- 4.0
-
-
- ..\..\packages\UnitsNet.5.9.0\lib\netstandard2.0\UnitsNet.dll
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
-
-
- MainWindow.xaml
- Code
-
+
+
+
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
+
+
-
+
+
-
+
-
+
\ No newline at end of file
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs
index 555fc3195d..3892c639cb 100644
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs
+++ b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/UnitListItem.cs
@@ -14,7 +14,7 @@ public UnitListItem(Enum val)
UnitEnumValue = val;
UnitEnumValueInt = Convert.ToInt32(val);
UnitEnumType = val.GetType();
- Abbreviation = UnitAbbreviationsCache.Default.GetDefaultAbbreviation(UnitEnumType, UnitEnumValueInt);
+ Abbreviation = UnitsNetSetup.Default.UnitAbbreviations.GetDefaultAbbreviation(UnitEnumType, UnitEnumValueInt);
Text = $"{val} [{Abbreviation}]";
}
diff --git a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config b/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config
deleted file mode 100644
index 6a2293dbe8..0000000000
--- a/Samples/UnitConverter.Wpf/UnitConverter.Wpf/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UnitsNet.Benchmark/BenchmarkHelpers.cs b/UnitsNet.Benchmark/BenchmarkHelpers.cs
new file mode 100644
index 0000000000..477c1c67e3
--- /dev/null
+++ b/UnitsNet.Benchmark/BenchmarkHelpers.cs
@@ -0,0 +1,82 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace UnitsNet.Benchmark;
+
+public static class BenchmarkHelpers
+{
+ public static string[] GetRandomAbbreviations(this Random random, UnitAbbreviationsCache abbreviations, int nbAbbreviations)
+ {
+ return random.GetItems(abbreviations.GetAllUnitAbbreviationsForQuantity(typeof(TQuantity)).ToArray(), nbAbbreviations);
+ }
+
+ public static (TQuantity Quantity, TUnit Unit)[] GetRandomConversions(this Random random, double value, TUnit[] options,
+ int nbConversions)
+ where TQuantity : IQuantity
+ where TUnit : struct, Enum
+ {
+ var quantities = GetRandomQuantities(random, value, options, nbConversions);
+ TUnit[] units = random.GetItems(options, nbConversions);
+ return quantities.Zip(units, (quantity, unit) => (quantity, unit)).ToArray();
+ }
+
+ public static IEnumerable GetRandomQuantities(this Random random, double value, TUnit[] units, int nbQuantities)
+ where TQuantity : IQuantity where TUnit : struct, Enum
+ {
+ IEnumerable quantities = random.GetItems(units, nbQuantities).Select(unit => (TQuantity)Quantity.From(value, unit));
+ return quantities;
+ }
+
+#if !NET
+ /// Creates an array populated with items chosen at random from the provided set of choices.
+ /// The random number generator used to select items.
+ /// The items to use to populate the array.
+ /// The length of array to return.
+ /// The type of array.
+ ///
+ /// is empty.
+ ///
+ /// is .
+ ///
+ /// is not zero or a positive number.
+ /// An array populated with random items.
+ public static T[] GetItems(this Random random, T[] choices, int length)
+ {
+ return GetItems(random, new ReadOnlySpan(choices), length);
+ }
+
+ ///
+ /// Generates an array of specified length with items chosen at random from the provided set of choices.
+ ///
+ /// The type of the items.
+ /// The random number generator used to select items.
+ /// The set of items to choose from.
+ /// The length of the resulting array.
+ /// An array of randomly selected items.
+ /// Thrown when is empty.
+ public static T[] GetItems(this Random random, ReadOnlySpan choices, int length)
+ {
+ T[] array = new T[length];
+ GetItems(random, choices, array.AsSpan());
+ return array;
+ }
+
+ /// Fills the elements of a specified span with items chosen at random from the provided set of choices.
+ /// The random number generator used to select items.
+ /// The items to use to populate the span.
+ /// The span to be filled with items.
+ /// The type of span.
+ ///
+ /// is empty.
+ public static void GetItems(this Random random, ReadOnlySpan choices, Span destination)
+ {
+ for (int index = 0; index < destination.Length; ++index)
+ destination[index] = choices[random.Next(choices.Length)];
+ }
+ #endif
+}
diff --git a/UnitsNet.Benchmark/Comparisons/ComparisonBenchmarks.cs b/UnitsNet.Benchmark/Comparisons/ComparisonBenchmarks.cs
new file mode 100644
index 0000000000..6bbc84741d
--- /dev/null
+++ b/UnitsNet.Benchmark/Comparisons/ComparisonBenchmarks.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Comparisons;
+
+[MemoryDiagnoser]
+[ShortRunJob(RuntimeMoniker.Net48)]
+[ShortRunJob(RuntimeMoniker.Net80)]
+public class ComparisonBenchmarks
+{
+ private static readonly Mass Tolerance = Mass.FromNanograms(1);
+
+ public static IEnumerable Operands()
+ {
+ // equal value and unit
+ yield return [Mass.From(42, Mass.BaseUnit), Mass.From(42, Mass.BaseUnit)];
+ // equal value and unit
+ yield return [Mass.FromGrams(42), Mass.FromGrams(42)];
+ // zero in another unit
+ yield return [Mass.Zero, Mass.FromGrams(0)];
+ // same quantity in another unit
+ yield return [Mass.FromGrams(42), Mass.FromMilligrams(42000)];
+ // same quantity in another unit (in reverse)
+ yield return [Mass.FromMilligrams(42000), Mass.FromGrams(42)];
+ // different value and same unit
+ yield return [Mass.FromGrams(42), Mass.FromGrams(42.1)];
+ // huge values, same unit
+ yield return [Mass.FromGrams(-1e37), Mass.FromGrams(1 / 1e12)];
+ // huge values, different units
+ yield return [Mass.FromGrams(-1e37), Mass.FromMilligrams(1 / 1e12)];
+ // Math.PI, same unit
+ yield return [Mass.FromGrams(Math.PI), Mass.FromGrams(Math.PI)];
+ // Math.PI, different units
+ yield return [Mass.FromGrams(Math.PI), Mass.FromMilligrams(Math.PI)];
+ // very close fractions, same units
+ yield return [Mass.FromGrams(12.3456789987654321), Mass.FromGrams(12.3456789987654322)];
+ }
+
+ [Benchmark]
+ [ArgumentsSource(nameof(Operands))]
+ public bool Equals(Mass a, Mass b)
+ {
+ return a.Equals(b);
+ }
+
+ [Benchmark]
+ [ArgumentsSource(nameof(Operands))]
+ public bool EqualsTolerance(Mass a, Mass b)
+ {
+ return a.Equals(b, Tolerance);
+ }
+
+ [Benchmark]
+ [ArgumentsSource(nameof(Operands))]
+ public bool GetHashCode(Mass a, Mass b)
+ {
+ return a.GetHashCode() == b.GetHashCode();
+ }
+
+ [Benchmark]
+ [ArgumentsSource(nameof(Operands))]
+ public int CompareTo(Mass a, Mass b)
+ {
+ return a.CompareTo(b);
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromString/ParseUnitBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromString/ParseUnitBenchmarks.cs
new file mode 100644
index 0000000000..5cd182185c
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromString/ParseUnitBenchmarks.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Globalization;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.FromString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class ParseUnitBenchmarks
+{
+ private const int NbAbbreviations = 1000;
+
+ private static readonly CultureInfo Culture = CultureInfo.InvariantCulture;
+ private readonly Random _random = new(42);
+ private string[] _densityUnits;
+ private string[] _massUnits;
+ private string[] _pressureUnits;
+ private string[] _volumeFlowUnits;
+ private string[] _volumeUnits = [];
+
+ [GlobalSetup(Target = nameof(ParseMassUnit))]
+ public void PrepareMassUnits()
+ {
+ _massUnits = _random.GetItems(["mg", "g", "kg", "lbs", "Mlbs"], NbAbbreviations);
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ Mass.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ [GlobalSetup(Target = nameof(ParseVolumeUnit))]
+ public void PrepareVolumeUnits()
+ {
+ _volumeUnits = _random.GetItems(["ml", "l", "L", "cm³", "m³"], NbAbbreviations);
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ Volume.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ [GlobalSetup(Target = nameof(ParseDensityUnit))]
+ public void PrepareDensityUnits()
+ {
+ _densityUnits = _random.GetRandomAbbreviations(UnitsNetSetup.Default.UnitAbbreviations, NbAbbreviations);
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ Density.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ [GlobalSetup(Target = nameof(ParsePressureUnit))]
+ public void PreparePressureUnits()
+ {
+ _pressureUnits = _random.GetRandomAbbreviations(UnitsNetSetup.Default.UnitAbbreviations, NbAbbreviations);
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ Pressure.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ [GlobalSetup(Target = nameof(ParseVolumeFlowUnit))]
+ public void PrepareVolumeFlowUnits()
+ {
+ _volumeFlowUnits = _random.GetRandomAbbreviations(UnitsNetSetup.Default.UnitAbbreviations, NbAbbreviations);
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ VolumeFlow.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ [Benchmark(Baseline = true)]
+ public MassUnit ParseMassUnit()
+ {
+ MassUnit unit = default;
+ foreach (var unitToParse in _massUnits)
+ {
+ unit = Mass.ParseUnit(unitToParse, Culture);
+ }
+
+ return unit;
+ }
+
+ [Benchmark(Baseline = false)]
+ public VolumeUnit ParseVolumeUnit()
+ {
+ VolumeUnit unit = default;
+ foreach (var unitToParse in _volumeUnits)
+ {
+ unit = Volume.ParseUnit(unitToParse, Culture);
+ }
+
+ return unit;
+ }
+
+ [Benchmark(Baseline = false)]
+ public DensityUnit ParseDensityUnit()
+ {
+ DensityUnit unit = default;
+ foreach (var unitToParse in _densityUnits)
+ {
+ unit = Density.ParseUnit(unitToParse, Culture);
+ }
+
+ return unit;
+ }
+
+ [Benchmark(Baseline = false)]
+ public PressureUnit ParsePressureUnit()
+ {
+ PressureUnit unit = default;
+ foreach (var unitToParse in _pressureUnits)
+ {
+ unit = Pressure.ParseUnit(unitToParse, Culture);
+ }
+
+ return unit;
+ }
+
+ [Benchmark(Baseline = false)]
+ public VolumeFlowUnit ParseVolumeFlowUnit()
+ {
+ VolumeFlowUnit unit = default;
+ foreach (var unitToParse in _volumeFlowUnits)
+ {
+ unit = VolumeFlow.ParseUnit(unitToParse, Culture);
+ }
+
+ return unit;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromString/QuantityFromStringBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromStringBenchmarks.cs
new file mode 100644
index 0000000000..8abb153032
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromStringBenchmarks.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.FromString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class QuantityFromStringBenchmarks
+{
+ private static readonly CultureInfo Culture = CultureInfo.InvariantCulture;
+ private static readonly string ValueToParse = 123.456.ToString(Culture);
+
+ private readonly Random _random = new(42);
+ private string[] _quantitiesToParse;
+
+ [Params(1000)]
+ public int NbAbbreviations { get; set; }
+
+ [GlobalSetup(Target = nameof(FromMassString))]
+ public void PrepareMassStrings()
+ {
+ // can't have "mg" or "g" (see Acceleration.StandardGravity) and who knows what more...
+ _quantitiesToParse = _random.GetItems(["kg", "lbs", "Mlbs"], NbAbbreviations).Select(abbreviation => $"{ValueToParse} {abbreviation}").ToArray();
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeUnitAbbreviation))]
+ public void PrepareVolumeStrings()
+ {
+ _quantitiesToParse = _random.GetItems(["ml", "l", "cm³", "m³"], NbAbbreviations).Select(abbreviation => $"{ValueToParse} {abbreviation}").ToArray();;
+ }
+
+ [GlobalSetup(Target = nameof(FromPressureUnitAbbreviation))]
+ public void PreparePressureUnits()
+ {
+ _quantitiesToParse = _random.GetRandomAbbreviations(UnitsNetSetup.Default.UnitAbbreviations, NbAbbreviations).Select(abbreviation => $"{ValueToParse} {abbreviation}").ToArray();;
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeFlowUnitAbbreviation))]
+ public void PrepareVolumeFlowUnits()
+ {
+ // can't have "bpm" (see Frequency)
+ _quantitiesToParse =
+ _random.GetItems(
+ UnitsNetSetup.Default.UnitAbbreviations.GetAllUnitAbbreviationsForQuantity(typeof(VolumeFlowUnit)).Where(x => x != "bpm").ToArray(),
+ NbAbbreviations).Select(abbreviation => $"{ValueToParse} {abbreviation}").ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public IQuantity FromMassString()
+ {
+ IQuantity quantity = null;
+ foreach (var quantityString in _quantitiesToParse)
+ {
+ quantity = Quantity.Parse(Culture, typeof(Mass), quantityString);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var quantityString in _quantitiesToParse)
+ {
+ quantity = Quantity.Parse(Culture, typeof(Volume), quantityString);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromPressureUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var quantityString in _quantitiesToParse)
+ {
+ quantity = Quantity.Parse(Culture, typeof(Pressure), quantityString);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeFlowUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var quantityString in _quantitiesToParse)
+ {
+ quantity = Quantity.Parse(Culture, typeof(VolumeFlow), quantityString);
+ }
+
+ return quantity;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitAbbreviationBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitAbbreviationBenchmarks.cs
new file mode 100644
index 0000000000..9a6b3ae576
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitAbbreviationBenchmarks.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.FromString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class QuantityFromUnitAbbreviationBenchmarks
+{
+ private static readonly CultureInfo Culture = CultureInfo.InvariantCulture;
+ private readonly Random _random = new(42);
+ private string[] _massUnits;
+ private string[] _pressureUnits;
+ private string[] _volumeFlowUnits;
+ private string[] _volumeUnits = [];
+
+ [Params(1000)]
+ public int NbAbbreviations { get; set; }
+
+ [GlobalSetup(Target = nameof(FromMassUnitAbbreviation))]
+ public void PrepareMassUnits()
+ {
+ // can't have "mg" or "g" (see Acceleration.StandardGravity) and who knows what more...
+ _massUnits = _random.GetItems(["kg", "lbs", "Mlbs"], NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeUnitAbbreviation))]
+ public void PrepareVolumeUnits()
+ {
+ _volumeUnits = _random.GetItems(["ml", "l", "cm³", "m³"], NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromPressureUnitAbbreviation))]
+ public void PreparePressureUnits()
+ {
+ _pressureUnits = _random.GetRandomAbbreviations(UnitsNetSetup.Default.UnitAbbreviations, NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeFlowUnitAbbreviation))]
+ public void PrepareVolumeFlowUnits()
+ {
+ // can't have "bpm" (see Frequency)
+ _volumeFlowUnits =
+ _random.GetItems(
+ UnitsNetSetup.Default.UnitAbbreviations.GetAllUnitAbbreviationsForQuantity(typeof(VolumeFlowUnit)).Where(x => x != "bpm").ToArray(),
+ NbAbbreviations);
+ }
+
+ [Benchmark(Baseline = true)]
+ public IQuantity FromMassUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var unitToParse in _massUnits)
+ {
+ quantity = Quantity.FromUnitAbbreviation(Culture, 1, unitToParse);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var unitToParse in _volumeUnits)
+ {
+ quantity = Quantity.FromUnitAbbreviation(Culture, 1, unitToParse);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromPressureUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var unitToParse in _pressureUnits)
+ {
+ quantity = Quantity.FromUnitAbbreviation(Culture, 1, unitToParse);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeFlowUnitAbbreviation()
+ {
+ IQuantity quantity = null;
+ foreach (var unitToParse in _volumeFlowUnits)
+ {
+ quantity = Quantity.FromUnitAbbreviation(Culture, 1, unitToParse);
+ }
+
+ return quantity;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitNameBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitNameBenchmarks.cs
new file mode 100644
index 0000000000..f337295e9d
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromString/QuantityFromUnitNameBenchmarks.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Conversions.FromString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class QuantityFromUnitNameBenchmarks
+{
+ private readonly Random _random = new(42);
+ private string[] _unitNames;
+
+ [Params(1000)]
+ public int NbAbbreviations { get; set; }
+
+ [GlobalSetup(Target = nameof(FromMassUnitName))]
+ public void PrepareMassUnits()
+ {
+ _unitNames = _random.GetItems(Mass.Info.UnitInfos.Select(x => x.Name).ToArray(), NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeUnitName))]
+ public void PrepareVolumeUnits()
+ {
+ _unitNames = _random.GetItems(Volume.Info.UnitInfos.Select(x => x.Name).ToArray(), NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromPressureUnitName))]
+ public void PreparePressureUnits()
+ {
+ _unitNames = _random.GetItems(Pressure.Info.UnitInfos.Select(x => x.Name).ToArray(), NbAbbreviations);
+ }
+
+ [GlobalSetup(Target = nameof(FromVolumeFlowUnitName))]
+ public void PrepareVolumeFlowUnits()
+ {
+ _unitNames = _random.GetItems(VolumeFlow.Info.UnitInfos.Select(x => x.Name).ToArray(), NbAbbreviations);
+ }
+
+ [Benchmark(Baseline = true)]
+ public IQuantity FromMassUnitName()
+ {
+ IQuantity quantity = null;
+ foreach (var unitName in _unitNames)
+ {
+ quantity = Quantity.From(1, nameof(Mass), unitName);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeUnitName()
+ {
+ IQuantity quantity = null;
+ foreach (var unitName in _unitNames)
+ {
+ quantity = Quantity.From(1, nameof(Volume), unitName);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromPressureUnitName()
+ {
+ IQuantity quantity = null;
+ foreach (var unitName in _unitNames)
+ {
+ quantity = Quantity.From(1, nameof(Pressure), unitName);
+ }
+
+ return quantity;
+ }
+
+ [Benchmark(Baseline = false)]
+ public IQuantity FromVolumeFlowUnitName()
+ {
+ IQuantity quantity = null;
+ foreach (var unitName in _unitNames)
+ {
+ quantity = Quantity.From(1, nameof(VolumeFlow), unitName);
+ }
+
+ return quantity;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromString/TryParseInvalidUnitBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromString/TryParseInvalidUnitBenchmarks.cs
new file mode 100644
index 0000000000..bd24c1c579
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromString/TryParseInvalidUnitBenchmarks.cs
@@ -0,0 +1,108 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Conversions.FromString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class TryParseInvalidUnitBenchmarks
+{
+ private const int NbAbbreviations = 1000;
+
+ private static readonly CultureInfo Culture = CultureInfo.InvariantCulture;
+ private readonly Random _random = new(42);
+ private string[] _invalidUnits = [];
+
+ [GlobalSetup]
+ public void Setup()
+ {
+ _invalidUnits = Enumerable.Range(0, NbAbbreviations).Select(_ => GenerateInvalidUnit()).ToArray();
+ // initializes the QuantityInfoLookup and the abbreviations cache
+ Mass.TryParseUnit("_invalid", Culture, out _);
+ Volume.TryParseUnit("_invalid", Culture, out _);
+ Density.TryParseUnit("_invalid", Culture, out _);
+ Pressure.TryParseUnit("_invalid", Culture, out _);
+ VolumeFlow.TryParseUnit("_invalid", Culture, out _);
+ }
+
+ private string GenerateInvalidUnit()
+ {
+ var sb = new StringBuilder();
+ var length = _random.Next(1, 10);
+ for (var i = 0; i < length; i++)
+ {
+ sb.Append((char)_random.Next('a', 'z'));
+ }
+
+ return sb.ToString();
+ }
+
+
+ [Benchmark(Baseline = true)]
+ public bool TryParseMassUnit()
+ {
+ var success = true;
+ foreach (var unitToParse in _invalidUnits)
+ {
+ success = Mass.TryParseUnit(unitToParse, Culture, out _);
+ }
+
+ return success;
+ }
+
+ [Benchmark(Baseline = false)]
+ public bool TryParseVolumeUnit()
+ {
+ var success = true;
+ foreach (var unitToParse in _invalidUnits)
+ {
+ success = Volume.TryParseUnit(unitToParse, Culture, out _);
+ }
+
+ return success;
+ }
+
+ [Benchmark(Baseline = false)]
+ public bool TryParseDensityUnit()
+ {
+ var success = true;
+ foreach (var unitToParse in _invalidUnits)
+ {
+ success = Density.TryParseUnit(unitToParse, Culture, out _);
+ }
+
+ return success;
+ }
+
+ [Benchmark(Baseline = false)]
+ public bool TryParsePressureUnit()
+ {
+ var success = true;
+ foreach (var unitToParse in _invalidUnits)
+ {
+ success = Pressure.TryParseUnit(unitToParse, Culture, out _);
+ }
+
+ return success;
+ }
+
+ [Benchmark(Baseline = false)]
+ public bool TryParseVolumeFlowUnit()
+ {
+ var success = true;
+ foreach (var unitToParse in _invalidUnits)
+ {
+ success = VolumeFlow.TryParseUnit(unitToParse, Culture, out _);
+ }
+
+ return success;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/FromUnit/QuantityFromUnitBenchmarks.cs b/UnitsNet.Benchmark/Conversions/FromUnit/QuantityFromUnitBenchmarks.cs
new file mode 100644
index 0000000000..a7226e9f0a
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/FromUnit/QuantityFromUnitBenchmarks.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Conversions.FromUnit;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class QuantityFromUnitBenchmarks
+{
+ private static readonly Enum[] BaseUnits = Quantity.Infos.Select(x => x.BaseUnitInfo.Value).ToArray();
+
+ [Benchmark(Baseline = true)]
+ public void QuantityFromUnit()
+ {
+ foreach (Enum baseUnit in BaseUnits)
+ {
+ IQuantity quantity = Quantity.From(1, baseUnit);
+ }
+ }
+
+ [Benchmark]
+ public void QuantityTryFromUnit()
+ {
+ foreach (Enum baseUnit in BaseUnits)
+ {
+ var success = Quantity.TryFrom(1, baseUnit, out _);
+ }
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/Relations/InverseElectricConductivityBenchmarks.cs b/UnitsNet.Benchmark/Conversions/Relations/InverseElectricConductivityBenchmarks.cs
new file mode 100644
index 0000000000..58f4d60c46
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/Relations/InverseElectricConductivityBenchmarks.cs
@@ -0,0 +1,23 @@
+using BenchmarkDotNet.Attributes;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.Relations;
+
+[MemoryDiagnoser]
+[ShortRunJob]
+// [DryJob]
+public class InverseElectricConductivityBenchmarks
+{
+ private static readonly double Value = 123.456;
+
+ [ParamsAllValues]
+ public ElectricConductivityUnit Unit { get; set; }
+ private ElectricConductivity TestQuantity => new(Value, Unit);
+
+
+ [Benchmark(Baseline = true)]
+ public ElectricResistivity Inverse()
+ {
+ return TestQuantity.Inverse();
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/Relations/InverseElectricResistivityBenchmarks.cs b/UnitsNet.Benchmark/Conversions/Relations/InverseElectricResistivityBenchmarks.cs
new file mode 100644
index 0000000000..2d238a8ae7
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/Relations/InverseElectricResistivityBenchmarks.cs
@@ -0,0 +1,22 @@
+using BenchmarkDotNet.Attributes;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.Relations;
+
+[MemoryDiagnoser]
+[ShortRunJob]
+public class InverseElectricResistivityBenchmarks
+{
+ private static readonly double Value = 123.456;
+
+ [ParamsAllValues]
+ public ElectricResistivityUnit Unit { get; set; }
+ private ElectricResistivity TestQuantity => new(Value, Unit);
+
+
+ [Benchmark(Baseline = true)]
+ public ElectricConductivity Inverse()
+ {
+ return TestQuantity.Inverse();
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/Relations/InverseOperationBenchmarks.cs b/UnitsNet.Benchmark/Conversions/Relations/InverseOperationBenchmarks.cs
new file mode 100644
index 0000000000..7d19981c05
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/Relations/InverseOperationBenchmarks.cs
@@ -0,0 +1,63 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.Relations;
+
+[MemoryDiagnoser]
+[ShortRunJob(RuntimeMoniker.Net48)]
+[ShortRunJob(RuntimeMoniker.Net80)]
+public class InverseOperationBenchmarks
+{
+ private static readonly double Value = 123.456;
+
+ // new (typeof(Area), typeof(ReciprocalArea)),
+ // new (typeof(Density), typeof(SpecificVolume)),
+ // new (typeof(ElectricConductivity), typeof(ElectricResistivity)),
+ // new (typeof(Length), typeof(ReciprocalLength)),
+
+ [Params(typeof(Area), typeof(Length))]
+ public Type TypeToTest { get; set; }
+
+
+ [Benchmark(Baseline = true)]
+ public IQuantity ConvertWithoutInverse()
+ {
+ IQuantity result = default;
+ if (TypeToTest == typeof(Area))
+ {
+ foreach (AreaUnit fromUnit in Area.Units)
+ {
+ var quantity = Area.From(Value, fromUnit);
+ result = quantity.Inverse();
+ }
+
+ foreach (ReciprocalAreaUnit fromUnit in ReciprocalArea.Units)
+ {
+ var quantity = ReciprocalArea.From(Value, fromUnit);
+ result = quantity.Inverse();
+ }
+ }
+ else if (TypeToTest == typeof(Length))
+ {
+ foreach (LengthUnit fromUnit in Length.Units)
+ {
+ var quantity = Length.From(Value, fromUnit);
+ result = quantity.Inverse();
+ }
+
+ foreach (ReciprocalLengthUnit fromUnit in ReciprocalLength.Units)
+ {
+ var quantity = ReciprocalLength.From(Value, fromUnit);
+ result = quantity.Inverse();
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToString/ToStringWithDefaultPrecisionBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToString/ToStringWithDefaultPrecisionBenchmarks.cs
new file mode 100644
index 0000000000..6d0560ebfb
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToString/ToStringWithDefaultPrecisionBenchmarks.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.ToString;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class ToStringWithDefaultPrecisionBenchmarks
+{
+ private static readonly double Value = 123.456;
+ private readonly Random _random = new(42);
+
+ private Mass[] _masses = [];
+ private VolumeFlow[] _volumeFlows = [];
+
+ [Params(1000)]
+ public int NbConversions { get; set; }
+
+ [Params("G", "S", "E", "N", "A")]
+ public string Format { get; set; }
+
+ [GlobalSetup(Target = nameof(MassToString))]
+ public void PrepareMassesToTest()
+ {
+ _masses = _random.GetRandomQuantities(Value, Mass.Units, NbConversions).ToArray();
+ }
+
+ [GlobalSetup(Target = nameof(VolumeFlowToString))]
+ public void PrepareVolumeFlowsToTest()
+ {
+ _volumeFlows = _random.GetRandomQuantities(Value, VolumeFlow.Units, NbConversions).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public void MassToString()
+ {
+ foreach (Mass quantity in _masses)
+ {
+ var result = quantity.ToString(Format, CultureInfo.InvariantCulture);
+ }
+ }
+
+ [Benchmark]
+ public void VolumeFlowToString()
+ {
+ foreach (VolumeFlow quantity in _volumeFlows)
+ {
+ var result = quantity.ToString(Format, CultureInfo.InvariantCulture);
+ }
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToUnit/MassQuantityConversionBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToUnit/MassQuantityConversionBenchmarks.cs
new file mode 100644
index 0000000000..9dedce791a
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToUnit/MassQuantityConversionBenchmarks.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using BenchmarkDotNet.Attributes;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.ToUnit;
+
+[MemoryDiagnoser]
+public class MassQuantityConversionBenchmarks
+{
+ private static readonly Mass FromMass = new(12345.67, MassUnit.Milligram);
+ private static readonly Dictionary<(MassUnit, MassUnit), Func> ConversionFunctions = GetConversionsFunctions();
+
+ private static Dictionary<(MassUnit, MassUnit), Func> GetConversionsFunctions()
+ {
+ var functions = new Dictionary<(MassUnit, MassUnit), Func>();
+ foreach (MassUnit unit in Mass.Units)
+ {
+ foreach (MassUnit otherUnit in Mass.Units)
+ {
+ functions.Add((unit, otherUnit), mass => mass.ToUnit(otherUnit));
+ }
+ }
+
+ // functions[(MassUnit.Milligram, MassUnit.Gram)] = mass => new Mass(mass.Value * new QuantityValue(1, 1000), MassUnit.Gram);
+ functions[(MassUnit.Milligram, MassUnit.Gram)] = mass => new Mass(mass.Value / 1000, MassUnit.Gram);
+
+ return functions;
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass ConvertFromMilligramToGram() => FromMass.ToUnit(MassUnit.Gram);
+
+ [Benchmark]
+ public Mass ConvertFromMilligramToGramWithDictionary() => ConversionFunctions[(MassUnit.Milligram, MassUnit.Gram)](FromMass);
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToUnit/QuantityConversionBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToUnit/QuantityConversionBenchmarks.cs
new file mode 100644
index 0000000000..926ca0f2d3
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToUnit/QuantityConversionBenchmarks.cs
@@ -0,0 +1,30 @@
+using System.Collections.Generic;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Conversions.ToUnit;
+
+[MemoryDiagnoser]
+[ShortRunJob(RuntimeMoniker.Net48)]
+[ShortRunJob(RuntimeMoniker.Net80)]
+public class QuantityConversionBenchmarks
+{
+ private static readonly IReadOnlyCollection Quantities =
+ Quantity.Infos.SelectMany(x => x.UnitInfos).Select(u => Quantity.From(123.456, u.Value)).ToList();
+
+ [Benchmark(Baseline = true)]
+ public double ConvertOnce()
+ {
+ double result = 0;
+ foreach (IQuantity quantity in Quantities)
+ {
+ foreach (UnitInfo unitInfo in quantity.QuantityInfo.UnitInfos)
+ {
+ result = quantity.As(unitInfo.Value);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToUnit/QuantityToUnitBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToUnit/QuantityToUnitBenchmarks.cs
new file mode 100644
index 0000000000..31160857f1
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToUnit/QuantityToUnitBenchmarks.cs
@@ -0,0 +1,54 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.ToUnit;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class QuantityToUnitBenchmarks
+{
+ private static readonly double Value = 123.456;
+ private readonly Random _random = new(42);
+
+ private (Mass Quantity, MassUnit Unit)[] _massConversions = [];
+ private (VolumeFlow Quantity, VolumeFlowUnit Unit)[] _volumeFlowConversions = [];
+
+ [Params(1000)]
+ public int NbConversions { get; set; }
+
+ [GlobalSetup(Target = nameof(MassToUnit))]
+ public void PrepareMassConversionsToTest()
+ {
+ _massConversions = _random.GetRandomConversions(Value, Mass.Units, NbConversions);
+ }
+
+ [GlobalSetup(Target = nameof(VolumeFlowToUnit))]
+ public void PrepareVolumeFlowConversionsToTest()
+ {
+ _volumeFlowConversions = _random.GetRandomConversions(Value, VolumeFlow.Units, NbConversions);
+ }
+
+ [Benchmark(Baseline = true)]
+ public void MassToUnit()
+ {
+ foreach ((Mass quantity, MassUnit unit) in _massConversions)
+ {
+ quantity.ToUnit(unit);
+ }
+ }
+
+ [Benchmark]
+ public void VolumeFlowToUnit()
+ {
+ foreach ((VolumeFlow quantity, VolumeFlowUnit unit) in _volumeFlowConversions)
+ {
+ quantity.ToUnit(unit);
+ }
+ }
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToValue/ConvertValueBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToValue/ConvertValueBenchmarks.cs
new file mode 100644
index 0000000000..ff02b0a189
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToValue/ConvertValueBenchmarks.cs
@@ -0,0 +1,57 @@
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+
+namespace UnitsNet.Benchmark.Conversions.ToValue;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class ConvertValueBenchmarks
+{
+ private static readonly double Value = 123.456;
+
+
+ [Benchmark(Baseline = true)]
+ public double ConvertWithConverter()
+ {
+ double result = default;
+ foreach (QuantityInfo quantityInfo in Quantity.Infos)
+ {
+ foreach (UnitInfo fromUnitInfo in quantityInfo.UnitInfos)
+ {
+ foreach (UnitInfo toUnitInfo in quantityInfo.UnitInfos)
+ {
+ result = UnitConverter.Convert(Value, fromUnitInfo.Value, toUnitInfo.Value);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ [Benchmark(Baseline = false)]
+ public double ConvertFromQuantity()
+ {
+ double result = default;
+ foreach (QuantityInfo quantityInfo in Quantity.Infos)
+ {
+ foreach (UnitInfo fromUnitInfo in quantityInfo.UnitInfos)
+ {
+ foreach (UnitInfo toUnitInfo in quantityInfo.UnitInfos)
+ {
+ result = Quantity.From(Value, fromUnitInfo.Value).As(toUnitInfo.Value);
+ }
+ }
+ }
+
+ return result;
+ }
+
+
+ [GlobalSetup]
+ public void PrepareTo_ConvertWith_FullyCachedFrozenDictionary()
+ {
+ var nbQuantities = Quantity.Infos.Count;
+ }
+
+}
diff --git a/UnitsNet.Benchmark/Conversions/ToValue/QuantityAsBenchmarks.cs b/UnitsNet.Benchmark/Conversions/ToValue/QuantityAsBenchmarks.cs
new file mode 100644
index 0000000000..bbab51b9a6
--- /dev/null
+++ b/UnitsNet.Benchmark/Conversions/ToValue/QuantityAsBenchmarks.cs
@@ -0,0 +1,103 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Conversions.ToValue;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net90)]
+public class QuantityAsBenchmarks
+{
+ private readonly Random _random = new Random(42);
+ private static readonly double Value = 123.456;
+
+ [Params(1000)]
+ public int NbConversions { get; set; }
+
+ private (Mass Quantity, MassUnit Unit)[] _massConversions = [];
+ private (Volume Quantity, VolumeUnit Unit)[] _volumeConversions = [];
+ private (Density Quantity, DensityUnit Unit)[] _densityConversions = [];
+ private (Pressure Quantity, PressureUnit Unit)[] _pressureConversions = [];
+ private (VolumeFlow Quantity, VolumeFlowUnit Unit)[] _volumeFlowConversions = [];
+
+
+ [GlobalSetup(Target = nameof(MassAs))]
+ public void PrepareMassConversionsToTest()
+ {
+ _massConversions = _random.GetRandomConversions(Value, Mass.Units, NbConversions);
+ }
+
+ [GlobalSetup(Target = nameof(VolumeAs))]
+ public void PrepareVolumeConversionsToTest()
+ {
+ _volumeConversions = _random.GetRandomConversions(Value, Volume.Units, NbConversions);
+ }
+
+ [GlobalSetup(Target = nameof(DensityAs))]
+ public void PrepareDensityConversionsToTest()
+ {
+ _densityConversions = _random.GetRandomConversions(Value, Density.Units, NbConversions);
+ }
+
+ [GlobalSetup(Target = nameof(PressureAs))]
+ public void PreparePressureConversionsToTest()
+ {
+ _pressureConversions = _random.GetRandomConversions(Value, Pressure.Units, NbConversions);
+ }
+
+ [GlobalSetup(Target = nameof(VolumeFlowAs))]
+ public void PrepareVolumeFlowConversionsToTest()
+ {
+ _volumeFlowConversions = _random.GetRandomConversions(Value, VolumeFlow.Units, NbConversions);
+ }
+
+ [Benchmark(Baseline = true)]
+ public void MassAs()
+ {
+ foreach (var conversion in _massConversions)
+ {
+ conversion.Quantity.As(conversion.Unit);
+ }
+ }
+
+ [Benchmark]
+ public void VolumeAs()
+ {
+ foreach (var conversion in _volumeConversions)
+ {
+ conversion.Quantity.As(conversion.Unit);
+ }
+ }
+
+ [Benchmark]
+ public void DensityAs()
+ {
+ foreach (var conversion in _densityConversions)
+ {
+ conversion.Quantity.As(conversion.Unit);
+ }
+ }
+
+ [Benchmark]
+ public void PressureAs()
+ {
+ foreach (var conversion in _pressureConversions)
+ {
+ conversion.Quantity.As(conversion.Unit);
+ }
+ }
+
+ [Benchmark]
+ public void VolumeFlowAs()
+ {
+ foreach (var conversion in _volumeFlowConversions)
+ {
+ conversion.Quantity.As(conversion.Unit);
+ }
+ }
+}
diff --git a/UnitsNet.Benchmark/Enums/BoxedEnumToIntegerBenchmarks.cs b/UnitsNet.Benchmark/Enums/BoxedEnumToIntegerBenchmarks.cs
new file mode 100644
index 0000000000..18cd6f3432
--- /dev/null
+++ b/UnitsNet.Benchmark/Enums/BoxedEnumToIntegerBenchmarks.cs
@@ -0,0 +1,59 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Runtime.CompilerServices;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Enums;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class BoxedEnumToIntegerBenchmarks
+{
+ private const int NbIterations = 1000;
+
+ private static readonly Enum Unit = MassUnit.Gram;
+
+ [Benchmark(Baseline = true)]
+ public int ConvertToInt32()
+ {
+ Enum unit = Unit;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += Convert.ToInt32(unit);
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ConvertWithCast()
+ {
+ Enum unit = Unit;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += (int)(object)unit;
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ConvertWithUnsafe()
+ {
+ Enum unit = Unit;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += Unsafe.Unbox(unit);
+ }
+
+ return total;
+ }
+}
diff --git a/UnitsNet.Benchmark/Enums/EnumToIntegerBenchmarks.cs b/UnitsNet.Benchmark/Enums/EnumToIntegerBenchmarks.cs
new file mode 100644
index 0000000000..75fc0b2fc3
--- /dev/null
+++ b/UnitsNet.Benchmark/Enums/EnumToIntegerBenchmarks.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Runtime.CompilerServices;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Enums;
+
+[ShortRunJob(RuntimeMoniker.Net48)]
+[ShortRunJob(RuntimeMoniker.Net80)]
+public class EnumToIntegerBenchmarks
+{
+ private const int NbIterations = 1000;
+
+ private const MassUnit Unit = MassUnit.Gram;
+
+ [Benchmark(Baseline = true)]
+ public int ConvertToInt32()
+ {
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += Convert.ToInt32(Unit);
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ConvertWithCast()
+ {
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += (int)Unit;
+ }
+
+ return total;
+ }
+
+ // #if NET
+ [Benchmark(Baseline = false)]
+ public int ConvertWithUnsafe()
+ {
+ MassUnit unit = Unit;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ total += Unsafe.As(ref unit);
+ }
+
+ return total;
+ }
+ // #endif
+}
diff --git a/UnitsNet.Benchmark/Enums/UnitKeyEqualsBenchmarks.cs b/UnitsNet.Benchmark/Enums/UnitKeyEqualsBenchmarks.cs
new file mode 100644
index 0000000000..e763b8233a
--- /dev/null
+++ b/UnitsNet.Benchmark/Enums/UnitKeyEqualsBenchmarks.cs
@@ -0,0 +1,60 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Enums;
+
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class UnitKeyEqualsBenchmarks
+{
+ private const int NbIterations = 1000;
+
+ private static readonly UnitKey UnitKey = UnitKey.ForUnit(VolumeUnit.CubicMeter);
+ private static readonly UnitKey OtherUnitKey = UnitKey.ForUnit(VolumeUnit.AcreFoot);
+ private readonly Type OtherUnitType = UnitKey.UnitType;
+ private readonly int OtherUnitValue = UnitKey.UnitValue;
+
+ private readonly Type UnitType = UnitKey.UnitType;
+ private readonly int UnitValue = UnitKey.UnitValue;
+
+ [Benchmark(Baseline = true)]
+ public bool EqualsRecord()
+ {
+ bool equal = false;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ equal = UnitKey.Equals(OtherUnitKey);
+ }
+
+ return equal;
+ }
+
+ [Benchmark(Baseline = false)]
+ public bool OperatorEqualsRecord()
+ {
+ bool equal = false;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ equal = UnitKey == OtherUnitKey;
+ }
+
+ return equal;
+ }
+
+ [Benchmark]
+ public bool OperatorEqualsManual()
+ {
+ bool equal = false;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ equal = UnitType == OtherUnitType && UnitValue == OtherUnitValue;
+ }
+
+ return equal;
+ }
+}
diff --git a/UnitsNet.Benchmark/Enums/UnitKeyHashCodeBenchmarks.cs b/UnitsNet.Benchmark/Enums/UnitKeyHashCodeBenchmarks.cs
new file mode 100644
index 0000000000..cdc09972c3
--- /dev/null
+++ b/UnitsNet.Benchmark/Enums/UnitKeyHashCodeBenchmarks.cs
@@ -0,0 +1,72 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Enums;
+
+// [MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class UnitKeyHashCodeBenchmarks
+{
+ private const int NbIterations = 1000;
+
+ private static readonly UnitKey UnitKey = UnitKey.ForUnit(VolumeUnit.CubicMeter);
+
+ private readonly Type UnitType = UnitKey.UnitType;
+ private readonly int UnitValue = UnitKey.UnitValue;
+
+ [Benchmark(Baseline = true)]
+ public int GetHashCodeRecord()
+ {
+ int hashCode = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ hashCode += UnitKey.GetHashCode();
+ }
+
+ return hashCode;
+ }
+
+ [Benchmark]
+ public int GetCustomHashCode()
+ {
+ int hashCode = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+#if NET
+ hashCode += HashCode.Combine(UnitType, UnitValue);
+#else
+ hashCode += (UnitType.GetHashCode() * 397) ^ UnitValue;
+#endif
+ }
+
+ return hashCode;
+ }
+
+ [Benchmark]
+ public int GetCustomHashCodeUnchecked()
+ {
+ int hashCode = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ if (UnitType == null)
+ {
+ hashCode += UnitValue;
+ }
+ else
+ {
+ unchecked
+ {
+ hashCode += (UnitType.GetHashCode() * 397) ^ UnitValue;
+ }
+ }
+ }
+
+ return hashCode;
+ }
+}
diff --git a/UnitsNet.Benchmark/Enums/UnitKeyToEnumBenchmarks.cs b/UnitsNet.Benchmark/Enums/UnitKeyToEnumBenchmarks.cs
new file mode 100644
index 0000000000..d70e9db227
--- /dev/null
+++ b/UnitsNet.Benchmark/Enums/UnitKeyToEnumBenchmarks.cs
@@ -0,0 +1,82 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Enums;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class UnitKeyToEnumBenchmarks
+{
+ private const int NbIterations = 500;
+ private static readonly UnitKey UnitKey = MassUnit.Gram;
+
+ [Benchmark(Baseline = true)]
+ public int ManualCast()
+ {
+ UnitKey unitKey = UnitKey;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ if ((MassUnit)unitKey.UnitValue == MassUnit.Gram)
+ {
+ total++;
+ }
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ExplicitCast()
+ {
+ UnitKey unitKey = UnitKey;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ if ((MassUnit)unitKey == MassUnit.Gram)
+ {
+ total++;
+ }
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ExplicitCastBoxed()
+ {
+ UnitKey unitKey = UnitKey;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ if (MassUnit.Gram.Equals((Enum)unitKey))
+ {
+ total++;
+ }
+ }
+
+ return total;
+ }
+
+ [Benchmark(Baseline = false)]
+ public int ToUnit()
+ {
+ UnitKey unitKey = UnitKey;
+ var total = 0;
+ for (var i = 0; i < NbIterations; i++)
+ {
+ if (unitKey.ToUnit() == MassUnit.Gram)
+ {
+ total++;
+ }
+ }
+
+ return total;
+ }
+}
diff --git a/UnitsNet.Benchmark/Initializations/UnitAbbreviationsCacheInitializationBenchmarks.cs b/UnitsNet.Benchmark/Initializations/UnitAbbreviationsCacheInitializationBenchmarks.cs
new file mode 100644
index 0000000000..26e6d9722b
--- /dev/null
+++ b/UnitsNet.Benchmark/Initializations/UnitAbbreviationsCacheInitializationBenchmarks.cs
@@ -0,0 +1,71 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Initializations;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class UnitAbbreviationsCacheInitializationBenchmarks
+{
+ [GlobalSetup]
+ public void InitializeUnitsNetSetup()
+ {
+ var quantities = Quantity.Infos.Count;
+ }
+
+ [Benchmark(Baseline = true)]
+ public string Default()
+ {
+ var cache = UnitAbbreviationsCache.CreateDefault();
+ return cache.GetDefaultAbbreviation(MassUnit.Gram);
+ }
+
+ [Benchmark]
+ public string EmptyWithCustomMapping()
+ {
+ var cache = new UnitAbbreviationsCache();
+ cache.MapUnitToDefaultAbbreviation(MassUnit.Gram, "zz");
+ return cache.GetDefaultAbbreviation(MassUnit.Gram);
+ }
+
+ [Benchmark]
+ public string WithSpecificQuantity()
+ {
+ var cache = new UnitAbbreviationsCache([Mass.Info]);
+ return cache.GetDefaultAbbreviation(MassUnit.Gram);
+ }
+
+ [Benchmark]
+ public string WithSpecificQuantityAndCustomMapping()
+ {
+ var cache = new UnitAbbreviationsCache([Mass.Info]);
+ cache.MapUnitToDefaultAbbreviation(MassUnit.Gram, "zz");
+ return cache.GetDefaultAbbreviation(MassUnit.Gram);
+ }
+
+ [Benchmark]
+ public string DefaultWithoutLookup()
+ {
+ var cache = UnitAbbreviationsCache.CreateDefault();
+ return cache.GetAbbreviations(Mass.Info.BaseUnitInfo)[0];
+ }
+
+ [Benchmark]
+ public string EmptyWithoutLookup()
+ {
+ var cache = new UnitAbbreviationsCache();
+ return cache.GetAbbreviations(Mass.Info.BaseUnitInfo)[0];
+ }
+
+ [Benchmark]
+ public string WithSpecificQuantityWithoutLookup()
+ {
+ var cache = new UnitAbbreviationsCache([Mass.Info]);
+ return cache.GetAbbreviations(Mass.Info.BaseUnitInfo)[0];
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddToTemperatureWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddToTemperatureWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..443da4b645
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddToTemperatureWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,46 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net90)]
+public class AddToTemperatureWithRandomUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private readonly Random _random = new(42);
+ private (Temperature left, TemperatureDelta right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(LeftValue, Temperature.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(RightValue, TemperatureDelta.Units, NbOperations),
+ (left, right) => (left, right))
+ .ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Temperature AddToTemperature()
+ {
+ Temperature sum = default;
+ foreach ((Temperature left, TemperatureDelta right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..1c456fb9ac
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,46 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoMassesWithRandomUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private readonly Random _random = new(42);
+ private (Mass left, Mass right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(LeftValue, Mass.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(RightValue, Mass.Units, NbOperations),
+ (left, right) => (left, right))
+ .ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass AddTwoMasses()
+ {
+ Mass sum = default;
+ foreach ((Mass left, Mass right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..b0b73bf36d
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoMassesWithSameUnitsBenchmarks.cs
@@ -0,0 +1,44 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoMassesWithSameUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private (Mass left, Mass right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [Params(MassUnit.Kilogram, MassUnit.Gram, MassUnit.Milligram)]
+ public MassUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = Enumerable.Range(0, NbOperations).Select(_ => (Mass.From(LeftValue, Unit), Mass.From(RightValue, Unit))).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass AddTwoMasses()
+ {
+ Mass sum = default;
+ foreach ((Mass left, Mass right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..a3239d3010
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,46 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoTemperatureDeltasWithRandomUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private readonly Random _random = new(42);
+ private (TemperatureDelta left, TemperatureDelta right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(LeftValue, TemperatureDelta.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(RightValue, TemperatureDelta.Units, NbOperations),
+ (left, right) => (left, right))
+ .ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public TemperatureDelta AddTwoDeltas()
+ {
+ TemperatureDelta sum = default;
+ foreach ((TemperatureDelta left, TemperatureDelta right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..03c93cfee9
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoTemperatureDeltasWithSameUnitsBenchmarks.cs
@@ -0,0 +1,49 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoTemperatureDeltasWithSameUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private readonly Random _random = new(42);
+ private (TemperatureDelta left, TemperatureDelta right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [Params(TemperatureDeltaUnit.Kelvin, TemperatureDeltaUnit.DegreeCelsius, TemperatureDeltaUnit.DegreeFahrenheit)]
+ public TemperatureDeltaUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(LeftValue, TemperatureDelta.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(RightValue, TemperatureDelta.Units, NbOperations),
+ (left, right) => (left, right))
+ .ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public TemperatureDelta AddTwoDeltas()
+ {
+ TemperatureDelta sum = default;
+ foreach ((TemperatureDelta left, TemperatureDelta right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..dcf3224e0b
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,46 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoVolumesWithRandomUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private readonly Random _random = new(42);
+ private (Volume left, Volume right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(LeftValue, Volume.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(RightValue, Volume.Units, NbOperations),
+ (left, right) => (left, right))
+ .ToArray();
+ }
+
+ [Benchmark]
+ public Volume AddTwoVolumes()
+ {
+ Volume sum = default;
+ foreach ((Volume left, Volume right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..a55151199a
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/AddTwoVolumesWithSameUnitsBenchmarks.cs
@@ -0,0 +1,44 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class AddTwoVolumesWithSameUnitsBenchmarks
+{
+ private static readonly double LeftValue = 1.23;
+ private static readonly double RightValue = 4.56;
+
+ private (Volume left, Volume right)[] _operands;
+
+ [Params(1_000)]
+ public int NbOperations { get; set; }
+
+ [Params(VolumeUnit.CubicMeter, VolumeUnit.Liter, VolumeUnit.Milliliter)]
+ public VolumeUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = Enumerable.Range(0, NbOperations).Select(_ => (Volume.From(LeftValue, Unit), Volume.From(RightValue, Unit))).ToArray();
+ }
+
+ [Benchmark]
+ public Volume AddTwoVolumes()
+ {
+ Volume sum = default;
+ foreach ((Volume left, Volume right) in _operands)
+ {
+ sum = left + right; // intentionally not summing the results
+ }
+
+ return sum;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..696242b9b7
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,58 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfMassesWithRandomUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(42);
+ private Mass[] _quantities;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = _random.GetRandomQuantities(Value, Mass.Units, NbOperations).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass SumOfMasses()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Mass sum = Mass.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass SumOfMassesWithBaseUnit()
+ {
+ return _quantities.Sum(Mass.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass SumOfMassesWithInMilligrams()
+ {
+ return _quantities.Sum(MassUnit.Milligram);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..2080183fa9
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfMassesWithSameUnitsBenchmarks.cs
@@ -0,0 +1,59 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfMassesWithSameUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private Mass[] _quantities;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [Params(MassUnit.Kilogram, MassUnit.Gram, MassUnit.Milligram)]
+ public MassUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = Enumerable.Range(0, NbOperations).Select(_ => Mass.From(Value, Unit)).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass SumOfMasses()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Mass sum = Mass.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass SumOfMassesInBaseUnit()
+ {
+ return _quantities.Sum(Mass.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass SumOfMassesInMilligram()
+ {
+ return _quantities.Sum(MassUnit.Milligram);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..65e135e3ae
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,58 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfTemperatureDeltasWithRandomUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(42);
+ private TemperatureDelta[] _quantities;
+
+ [Params(10, 1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = _random.GetRandomQuantities(Value, TemperatureDelta.Units, NbOperations).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public TemperatureDelta SumOfDeltas()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ TemperatureDelta sum = TemperatureDelta.Zero;
+ foreach (TemperatureDelta quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public TemperatureDelta SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(TemperatureDelta.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public TemperatureDelta SumOfTemperatureDeltasInDegreeFahrenheit()
+ {
+ return _quantities.Sum(TemperatureDeltaUnit.DegreeFahrenheit);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..5625d53c58
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfTemperatureDeltasWithSameUnitsBenchmarks.cs
@@ -0,0 +1,59 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfTemperatureDeltasWithSameUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private TemperatureDelta[] _quantities;
+
+ [Params(10, 1000)]
+ public int NbOperations { get; set; }
+
+ [Params(TemperatureDeltaUnit.Kelvin, TemperatureDeltaUnit.DegreeCelsius, TemperatureDeltaUnit.DegreeFahrenheit)]
+ public TemperatureDeltaUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = Enumerable.Range(0, NbOperations).Select(_ => TemperatureDelta.From(Value, Unit)).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public TemperatureDelta SumOfDeltas()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ TemperatureDelta sum = TemperatureDelta.Zero;
+ foreach (TemperatureDelta quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public TemperatureDelta SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(TemperatureDelta.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public TemperatureDelta SumOfTemperatureDeltasInDegreeFahrenheit()
+ {
+ return _quantities.Sum(TemperatureDeltaUnit.DegreeFahrenheit);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..76beab1238
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,60 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net90)]
+public class SumOfVolumesWithRandomUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(41);
+ private Volume[] _quantities;
+
+ [Params(10, 100, 1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = _random.GetRandomQuantities(Value, Volume.Units, NbOperations).ToArray();
+ Quantity.From(Value, Volume.BaseUnit); // TODO we need a better way to "disable" the lazy loading of the _quantitiesByUnitType (QuantityInfoLookup)
+ Console.Out.WriteLine("Quantities prepared: starting unit = {0}", _quantities[0].Unit);
+ }
+
+ [Benchmark(Baseline = true)]
+ public Volume SumOfVolumes()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Volume sum = Volume.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(Volume.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInMilliliter()
+ {
+ return _quantities.Sum(VolumeUnit.Milliliter);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsWithIteratorBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsWithIteratorBenchmarks.cs
new file mode 100644
index 0000000000..624a0ee775
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithRandomUnitsWithIteratorBenchmarks.cs
@@ -0,0 +1,41 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfVolumesWithRandomUnitsWithIteratorBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(41);
+ private Volume[] _quantities;
+
+ [Params(10, 100, 1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = _random.GetRandomQuantities(Value, Volume.Units, NbOperations).ToArray();
+ Quantity.From(Value, Volume.BaseUnit); // TODO we need a better way to "disable" the lazy loading of the _quantitiesByUnitType (QuantityInfoLookup)
+ Console.Out.WriteLine("Quantities prepared: starting unit = {0}", _quantities[0].Unit);
+ }
+
+ [Benchmark(Baseline = true)]
+ public Volume SumOfVolumes()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ throw new NotImplementedException();
+#endif
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSameUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSameUnitsBenchmarks.cs
new file mode 100644
index 0000000000..94f4765f4e
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSameUnitsBenchmarks.cs
@@ -0,0 +1,59 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class SumOfVolumesWithSameUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private Volume[] _quantities;
+
+ [Params(10, 1000)]
+ public int NbOperations { get; set; }
+
+ [Params(VolumeUnit.CubicMeter, VolumeUnit.Liter, VolumeUnit.Milliliter)]
+ public VolumeUnit Unit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _quantities = Enumerable.Range(0, NbOperations).Select(_ => Volume.From(Value, Unit)).ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Volume SumOfVolumes()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Volume sum = Volume.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(Volume.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInMilliliter()
+ {
+ return _quantities.Sum(VolumeUnit.Milliliter);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarImperialUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarImperialUnitsBenchmarks.cs
new file mode 100644
index 0000000000..a9cec2e553
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarImperialUnitsBenchmarks.cs
@@ -0,0 +1,66 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net90)]
+public class SumOfVolumesWithSimilarImperialUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(42);
+ private Volume[] _quantities;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [Params(VolumeUnit.ImperialOunce, VolumeUnit.ImperialGallon)]
+ public VolumeUnit StartingUnit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ Quantity.From(Value, Volume.BaseUnit); // TODO we need a better way to "disable" the lazy loading of the _quantitiesByUnitType (QuantityInfoLookup)
+
+ _quantities = _random.GetRandomQuantities(Value, [VolumeUnit.ImperialOunce, VolumeUnit.ImperialQuart, VolumeUnit.ImperialGallon], NbOperations - 1)
+ .Prepend(Volume.From(Value, StartingUnit)).ToArray();
+ Volume firstQuantity = _quantities[0];
+ Console.Out.WriteLine("Quantities prepared: starting unit = {0}", firstQuantity.Unit);
+ }
+
+ [Benchmark(Baseline = true)]
+ public Volume SumOfVolumes()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Volume sum = Volume.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(Volume.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInStartingUnit()
+ {
+ return _quantities.Sum(StartingUnit);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarSIUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarSIUnitsBenchmarks.cs
new file mode 100644
index 0000000000..39a69e3076
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Additions/SumOfVolumesWithSimilarSIUnitsBenchmarks.cs
@@ -0,0 +1,66 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Additions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net90)]
+public class SumOfVolumesWithSimilarSIUnitsBenchmarks
+{
+ private static readonly double Value = 1.23;
+
+ private readonly Random _random = new(42);
+ private Volume[] _quantities;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [Params(VolumeUnit.Milliliter, VolumeUnit.Liter)]
+ public VolumeUnit StartingUnit { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ Quantity.From(Value, Volume.BaseUnit); // TODO we need a better way to "disable" the lazy loading of the _quantitiesByUnitType (QuantityInfoLookup)
+
+ _quantities = _random.GetRandomQuantities(Value, [VolumeUnit.Microliter, VolumeUnit.Milliliter, VolumeUnit.Liter], NbOperations - 1)
+ .Prepend(Volume.From(Value, StartingUnit)).ToArray();
+ Volume firstQuantity = _quantities[0];
+ Console.Out.WriteLine("Quantities prepared: starting unit = {0}", firstQuantity.Unit);
+ }
+
+ [Benchmark(Baseline = true)]
+ public Volume SumOfVolumes()
+ {
+#if NET
+ return UnitsNet.GenericMath.GenericMathExtensions.Sum(_quantities);
+#else
+ Volume sum = Volume.Zero;
+ foreach (var quantity in _quantities)
+ {
+ sum = quantity + sum;
+ }
+
+ return sum;
+#endif
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInBaseUnit()
+ {
+ return _quantities.Sum(Volume.BaseUnit);
+ }
+
+ [Benchmark(Baseline = false)]
+ public Volume SumOfVolumesInMilliliter()
+ {
+ return _quantities.Sum(VolumeUnit.Milliliter);
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeBenchmarks.cs b/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeBenchmarks.cs
new file mode 100644
index 0000000000..ff28e8b517
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeBenchmarks.cs
@@ -0,0 +1,32 @@
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Divisions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class MassDividedByVolumeBenchmarks
+{
+ private static readonly double MassValue = 1.23;
+ private static readonly double VolumeValue = 9.42;
+
+ [Benchmark]
+ public Density MassByVolume()
+ {
+ Density result = default;
+ foreach (MassUnit massUnit in Mass.Units)
+ {
+ var mass = new Mass(MassValue, massUnit);
+ foreach (VolumeUnit volumeUnit in Volume.Units)
+ {
+ var volume = new Volume(VolumeValue, volumeUnit);
+
+ result = mass / volume;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..e880d6185d
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Divisions/MassDividedByVolumeWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,45 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Divisions;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class MassDividedByVolumeWithRandomUnitsBenchmarks
+{
+ private static readonly double MassValue = 1.23;
+ private static readonly double VolumeValue = 9.42;
+
+ private readonly Random _random = new(42);
+ private (Mass left, Volume right)[] _operands;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(MassValue, Mass.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(VolumeValue, Volume.Units, NbOperations), (mass, volume) => (volume: mass, density: volume))
+ .ToArray();
+ }
+
+ [Benchmark]
+ public Density MassByVolume()
+ {
+ Density result = default;
+ foreach ((Mass mass, Volume volume) in _operands)
+ {
+ result = mass / volume;
+ }
+
+ return result;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityBenchmarks.cs b/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityBenchmarks.cs
new file mode 100644
index 0000000000..63faa458c8
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityBenchmarks.cs
@@ -0,0 +1,50 @@
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Multiplications;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class VolumeTimesDensityBenchmarks
+{
+ private static readonly double DensityValue = 1.23;
+ private static readonly double VolumeValue = 9.42;
+
+ [Benchmark(Baseline = true)]
+ public Mass VolumeTimesDensity()
+ {
+ Mass result = default;
+ foreach (VolumeUnit volumeUnit in Volume.Units)
+ {
+ var volume = new Volume(VolumeValue, volumeUnit);
+ foreach (DensityUnit densityUnit in Density.Units)
+ {
+ var density = new Density(DensityValue, densityUnit);
+
+ result = volume * density;
+ }
+ }
+
+ return result;
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass DensityTimesVolume()
+ {
+ Mass result = default;
+ foreach (VolumeUnit volumeUnit in Volume.Units)
+ {
+ var volume = new Volume(VolumeValue, volumeUnit);
+ foreach (DensityUnit densityUnit in Density.Units)
+ {
+ var density = new Density(DensityValue, densityUnit);
+
+ result = density * volume;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityWithRandomUnitsBenchmarks.cs b/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityWithRandomUnitsBenchmarks.cs
new file mode 100644
index 0000000000..db2a40c94b
--- /dev/null
+++ b/UnitsNet.Benchmark/Operators/Multiplications/VolumeTimesDensityWithRandomUnitsBenchmarks.cs
@@ -0,0 +1,58 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using System.Linq;
+using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Jobs;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark.Operators.Multiplications;
+
+[MemoryDiagnoser]
+[SimpleJob(RuntimeMoniker.Net48)]
+[SimpleJob(RuntimeMoniker.Net80)]
+public class VolumeTimesDensityWithRandomUnitsBenchmarks
+{
+ private static readonly double DensityValue = 1.23;
+ private static readonly double VolumeValue = 9.42;
+
+ private readonly Random _random = new Random(42);
+ private (Volume volume, Density density)[] _operands;
+
+ [Params(1000)]
+ public int NbOperations { get; set; }
+
+ [GlobalSetup]
+ public void PrepareQuantities()
+ {
+ _operands = _random.GetRandomQuantities(VolumeValue, Volume.Units, NbOperations)
+ .Zip(_random.GetRandomQuantities(DensityValue, Density.Units, NbOperations),
+ (volume, density) => (volume, density))
+ .ToArray();
+ }
+
+ [Benchmark(Baseline = true)]
+ public Mass VolumeTimesDensity()
+ {
+ Mass result = default;
+ foreach ((Volume volume, Density density) in _operands)
+ {
+ result = volume * density;
+ }
+
+ return result;
+ }
+
+ [Benchmark(Baseline = false)]
+ public Mass DensityTimesVolume()
+ {
+ Mass result = default;
+ foreach ((Volume volume, Density density) in _operands)
+ {
+ result = density * volume;
+ }
+
+ return result;
+ }
+}
diff --git a/UnitsNet.Benchmark/Program.cs b/UnitsNet.Benchmark/Program.cs
index 75b1a89759..27e66760b3 100644
--- a/UnitsNet.Benchmark/Program.cs
+++ b/UnitsNet.Benchmark/Program.cs
@@ -1,87 +1,25 @@
-using BenchmarkDotNet.Attributes;
+using System;
+using System.Diagnostics;
+using System.Reflection;
+using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
-using UnitsNet.Units;
-namespace UnitsNet.Benchmark
-{
- [MemoryDiagnoser]
- public class UnitsNetBenchmarks
- {
- private readonly Length _length = Length.FromMeters(3.0);
- private readonly IQuantity _lengthIQuantity = Length.FromMeters(3.0);
-
- [Benchmark]
- [BenchmarkCategory("Construction")]
- public Length Constructor() => new Length(3.0, LengthUnit.Meter);
-
- [Benchmark]
- [BenchmarkCategory("Construction")]
- public Length Constructor_SI() => new Length(3.0, UnitSystem.SI);
-
- [Benchmark]
- [BenchmarkCategory("Construction")]
- public Length FromMethod() => Length.FromMeters(3.0);
-
- [Benchmark]
- [BenchmarkCategory("Transformation")]
- public double ToProperty() => _length.Centimeters;
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Value")]
- public double As() => _length.As(LengthUnit.Centimeter);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Value")]
- public double As_SI() => _length.As(UnitSystem.SI);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Quantity")]
- public Length ToUnit() => _length.ToUnit(LengthUnit.Centimeter);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Quantity")]
- public Length ToUnit_SI() => _length.ToUnit(UnitSystem.SI);
-
- [Benchmark]
- [BenchmarkCategory("ToString")]
- public string ToStringTest() => _length.ToString();
+namespace UnitsNet.Benchmark;
- [Benchmark]
- [BenchmarkCategory("Parsing")]
- public Length Parse() => Length.Parse("3.0 m");
-
- [Benchmark]
- [BenchmarkCategory("Parsing")]
- public bool TryParseValid() => Length.TryParse("3.0 m", out _);
-
- [Benchmark]
- [BenchmarkCategory("Parsing")]
- public bool TryParseInvalid() => Length.TryParse("3.0 zoom", out _);
-
- [Benchmark]
- [BenchmarkCategory("Construction")]
- public IQuantity QuantityFrom() => Quantity.From(3.0, LengthUnit.Meter);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Value")]
- public double IQuantity_As() => _lengthIQuantity.As(LengthUnit.Centimeter);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Value")]
- public double IQuantity_As_SI() => _lengthIQuantity.As(UnitSystem.SI);
-
- [Benchmark]
- [BenchmarkCategory("Transformation, Quantity")]
- public IQuantity IQuantity_ToUnit() => _lengthIQuantity.ToUnit(LengthUnit.Centimeter);
-
- [Benchmark]
- [BenchmarkCategory("ToString")]
- public string IQuantity_ToStringTest() => _lengthIQuantity.ToString();
- }
-
- class Program
+internal class Program
+{
+ private static void Main(string[] args)
{
- static void Main(string[] args)
- => BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
+ var switcher = new BenchmarkSwitcher(Assembly.GetExecutingAssembly());
+ Console.Out.WriteLine("Starting benchmarks with args = {0}", string.Join(" ", args));
+ if (Debugger.IsAttached)
+ {
+ Console.Out.WriteLine("Using an attached debugger: setting configuration to DebugInProcessConfig");
+ switcher.Run(args, new DebugInProcessConfig());
+ }
+ else
+ {
+ switcher.Run(args);
+ }
}
}
diff --git a/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat b/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat
index 8c631cb1de..895d9d9cb1 100644
--- a/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat
+++ b/UnitsNet.Benchmark/Scripts/json-export-all-runtimes.bat
@@ -4,8 +4,8 @@ SET projectdir="%scriptdir%..\.."
SET exportdir="%projectdir%\Artifacts\Benchmark"
:: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487
dotnet run --project "%projectdir%/UnitsNet.Benchmark" -c Release ^
---framework net6.0 ^
---runtimes net472 net48 netcoreapp2.1 netcoreapp3.1 net6.0 ^
+--framework net8.0 ^
+--runtimes net48 net8.0 ^
--artifacts=%exportdir% ^
--exporters json ^
--filter * ^
@@ -14,4 +14,4 @@ dotnet run --project "%projectdir%/UnitsNet.Benchmark" -c Release ^
--join %1 %2 %3
:: this runs fine, however there is currently no way of displaying multiple-lines-per-chart: see https://github.com/rhysd/github-action-benchmark/issues/18
-:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net6.0 --runtimes netcoreapp31 netcoreapp50 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json
+:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net8.0 --runtimes net48 net8.0 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json
diff --git a/UnitsNet.Benchmark/Scripts/json-export-net5.bat b/UnitsNet.Benchmark/Scripts/json-export-net5.bat
deleted file mode 100644
index 6d446ec0b5..0000000000
--- a/UnitsNet.Benchmark/Scripts/json-export-net5.bat
+++ /dev/null
@@ -1,17 +0,0 @@
-@echo off
-SET scriptdir=%~dp0
-SET projectdir="%scriptdir%..\.."
-SET exportdir="%projectdir%\Artifacts\Benchmark"
-:: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487
-dotnet run --project "%projectdir%\UnitsNet.Benchmark" -c Release ^
---framework net5.0 ^
---runtimes net5.0 ^
---artifacts=%exportdir% ^
---exporters json ^
---filter * ^
---iterationTime 250 ^
---statisticalTest 0.001ms ^
---join %1 %2 %3
-
-:: this runs fine, however there is currently no way of displaying multiple-lines-per-chart: see https://github.com/rhysd/github-action-benchmark/issues/18
-:: dotnet run --project "%scriptdir%/UnitsNet.Benchmark" -c Release -f net5.0 --runtimes netcoreapp31 net5.0 --filter ** --artifacts="%scriptdir%/Artifacts/Benchmark" --exporters json
diff --git a/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat b/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat
index aa592c0fba..19cff17270 100644
--- a/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat
+++ b/UnitsNet.Benchmark/Scripts/r-plot-all-runtimes.bat
@@ -4,8 +4,8 @@ SET projectdir="%scriptdir%..\.."
SET exportdir="%projectdir%\Artifacts\Benchmark"
:: this fails on the build server (also tested with the nightly benchmark.net package: 0.12.1.1533): possibly related to https://github.com/dotnet/BenchmarkDotNet/issues/1487
dotnet run --project "%projectdir%\UnitsNet.Benchmark" -c Release ^
---framework net5.0 ^
---runtimes net472 net48 netcoreapp2.1 netcoreapp3.1 net6.0 ^
+--framework net8.0 ^
+--runtimes net48 net8.0 ^
--artifacts=%exportdir% ^
--exporters rplot ^
--filter * ^
diff --git a/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj b/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj
index 2025f71740..11e298fdd7 100644
--- a/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj
+++ b/UnitsNet.Benchmark/UnitsNet.Benchmark.csproj
@@ -1,7 +1,8 @@
Exe
- net9.0;net48
+ net9.0;net48
+ preview
4.0.0.0
4.0.0.0
UnitsNet.Benchmark
@@ -10,10 +11,7 @@
-
-
- all
-
+
diff --git a/UnitsNet.Benchmark/UnitsNetBenchmarks.cs b/UnitsNet.Benchmark/UnitsNetBenchmarks.cs
new file mode 100644
index 0000000000..3b34d38ac9
--- /dev/null
+++ b/UnitsNet.Benchmark/UnitsNetBenchmarks.cs
@@ -0,0 +1,82 @@
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using BenchmarkDotNet.Attributes;
+using UnitsNet.Units;
+
+namespace UnitsNet.Benchmark;
+
+[MemoryDiagnoser]
+public class UnitsNetBenchmarks
+{
+ private readonly Length _length = Length.FromMeters(3.0);
+ private readonly IQuantity _lengthIQuantity = Length.FromMeters(3.0);
+
+ [Benchmark]
+ [BenchmarkCategory("Construction")]
+ public Length Constructor() => new Length(3.0, LengthUnit.Meter);
+
+ [Benchmark]
+ [BenchmarkCategory("Construction")]
+ public Length Constructor_SI() => new Length(3.0, UnitSystem.SI);
+
+ [Benchmark]
+ [BenchmarkCategory("Construction")]
+ public Length FromMethod() => Length.FromMeters(3.0);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation")]
+ public double ToProperty() => _length.Centimeters;
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Value")]
+ public double As() => _length.As(LengthUnit.Centimeter);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Value")]
+ public double As_SI() => _length.As(UnitSystem.SI);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Quantity")]
+ public Length ToUnit() => _length.ToUnit(LengthUnit.Centimeter);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Quantity")]
+ public Length ToUnit_SI() => _length.ToUnit(UnitSystem.SI);
+
+ [Benchmark]
+ [BenchmarkCategory("ToString")]
+ public string ToStringTest() => _length.ToString();
+
+ [Benchmark]
+ [BenchmarkCategory("Parsing")]
+ public Length Parse() => Length.Parse("3.0 m");
+
+ [Benchmark]
+ [BenchmarkCategory("Parsing")]
+ public bool TryParseValid() => Length.TryParse("3.0 m", out _);
+
+ [Benchmark]
+ [BenchmarkCategory("Parsing")]
+ public bool TryParseInvalid() => Length.TryParse("3.0 zoom", out _);
+
+ [Benchmark]
+ [BenchmarkCategory("Construction")]
+ public IQuantity QuantityFrom() => Quantity.From(3.0, LengthUnit.Meter);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Value")]
+ public double IQuantity_As() => _lengthIQuantity.As(LengthUnit.Centimeter);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Value")]
+ public double IQuantity_As_SI() => _lengthIQuantity.As(UnitSystem.SI);
+
+ [Benchmark]
+ [BenchmarkCategory("Transformation, Quantity")]
+ public IQuantity IQuantity_ToUnit() => _lengthIQuantity.ToUnit(LengthUnit.Centimeter);
+
+ [Benchmark]
+ [BenchmarkCategory("ToString")]
+ public string IQuantity_ToStringTest() => _lengthIQuantity.ToString();
+}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/AbsorbedDoseOfIonizingRadiation.nfproj b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/AbsorbedDoseOfIonizingRadiation.nfproj
index cadba14c15..f6a4dcd7bb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/AbsorbedDoseOfIonizingRadiation.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/AbsorbedDoseOfIonizingRadiation.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec
index 209f7e4f7e..20f695de69 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/UnitsNet.NanoFramework.AbsorbedDoseOfIonizingRadiation.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.AbsorbedDoseOfIonizingRadiation
- 5.74.0
+ 6.0.0-pre014
Units.NET AbsorbedDoseOfIonizingRadiation - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework absorbeddoseofionizingradiation unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/packages.config b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/AbsorbedDoseOfIonizingRadiation/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/Acceleration.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/Acceleration.nfproj
index 2e25d44e5c..df1a10492d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/Acceleration.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/Acceleration.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec
index 5cf3d586c8..f05a6331b3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/UnitsNet.NanoFramework.Acceleration.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Acceleration
- 5.74.0
+ 6.0.0-pre014
Units.NET Acceleration - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework acceleration unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Acceleration/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Acceleration/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/AmountOfSubstance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/AmountOfSubstance.nfproj
index 116c26de1b..c0f1b2fbf2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/AmountOfSubstance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/AmountOfSubstance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec
index 0a4a97855e..db64cb94cd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/UnitsNet.NanoFramework.AmountOfSubstance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.AmountOfSubstance
- 5.74.0
+ 6.0.0-pre014
Units.NET AmountOfSubstance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework amountofsubstance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmountOfSubstance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/AmplitudeRatio.nfproj b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/AmplitudeRatio.nfproj
index af1ad75dd9..e22c293100 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/AmplitudeRatio.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/AmplitudeRatio.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec
index 3d370970ca..4a2ddb024f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/UnitsNet.NanoFramework.AmplitudeRatio.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.AmplitudeRatio
- 5.74.0
+ 6.0.0-pre014
Units.NET AmplitudeRatio - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework amplituderatio unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/packages.config b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/AmplitudeRatio/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Angle/Angle.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Angle/Angle.nfproj
index 369e318f46..23e17a96b4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Angle/Angle.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Angle/Angle.nfproj
@@ -24,13 +24,13 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
-
- ..\packages\nanoFramework.System.Math.1.5.116\lib\System.Math.dll
+
+ ..\packages\nanoFramework.System.Math.1.5.43\lib\System.Math.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec
index 0138354374..0718204fbe 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Angle/UnitsNet.NanoFramework.Angle.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Angle
- 5.74.0
+ 6.0.0-pre014
Units.NET Angle - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,8 +17,8 @@
en-US
nanoframework angle unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Angle/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Angle/packages.config
index 53c5907746..ac11548cd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Angle/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Angle/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/ApparentEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/ApparentEnergy.nfproj
deleted file mode 100644
index a7164086cc..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/ApparentEnergy.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {6f80e841-e953-bc39-6670-8711f2ad9d18}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ApparentEnergy
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec
deleted file mode 100644
index 82c8695110..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/UnitsNet.NanoFramework.ApparentEnergy.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ApparentEnergy
- 5.74.0
- Units.NET ApparentEnergy - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ApparentEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework apparentenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentEnergy/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/ApparentPower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/ApparentPower.nfproj
deleted file mode 100644
index 1160bcd2f4..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/ApparentPower.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {88b9a61a-b21b-97cc-ef89-78d1e3ff7767}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ApparentPower
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec
deleted file mode 100644
index b604bc30dd..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/UnitsNet.NanoFramework.ApparentPower.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ApparentPower
- 5.74.0
- Units.NET ApparentPower - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ApparentPower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework apparentpower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ApparentPower/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Area/Area.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Area/Area.nfproj
index 54db8b7737..a5635a4a6e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Area/Area.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Area/Area.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec
index 0b3bae7ad8..19095d396e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Area/UnitsNet.NanoFramework.Area.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Area
- 5.74.0
+ 6.0.0-pre014
Units.NET Area - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework area unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Area/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Area/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Area/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Area/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/AreaDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/AreaDensity.nfproj
index c533ac9649..37a1fe8e9d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/AreaDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/AreaDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec
index 61c9d5b87d..ee4ffce936 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/UnitsNet.NanoFramework.AreaDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.AreaDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET AreaDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework areadensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/AreaMomentOfInertia.nfproj b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/AreaMomentOfInertia.nfproj
index 69fbf964a2..1ca5b17bd1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/AreaMomentOfInertia.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/AreaMomentOfInertia.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec
index e3996f7544..e4daee7ec1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/UnitsNet.NanoFramework.AreaMomentOfInertia.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.AreaMomentOfInertia
- 5.74.0
+ 6.0.0-pre014
Units.NET AreaMomentOfInertia - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework areamomentofinertia unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/packages.config b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/AreaMomentOfInertia/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BitRate/BitRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/BitRate/BitRate.nfproj
index 35689064da..e7649658be 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BitRate/BitRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/BitRate/BitRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec
index 9158002669..f9a992029b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/BitRate/UnitsNet.NanoFramework.BitRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.BitRate
- 5.74.0
+ 6.0.0-pre014
Units.NET BitRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework bitrate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BitRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/BitRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BitRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/BitRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/BrakeSpecificFuelConsumption.nfproj b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/BrakeSpecificFuelConsumption.nfproj
index 5b0333c12a..5fa730a735 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/BrakeSpecificFuelConsumption.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/BrakeSpecificFuelConsumption.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec
index 03e3aca333..ed82cfac50 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/UnitsNet.NanoFramework.BrakeSpecificFuelConsumption.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.BrakeSpecificFuelConsumption
- 5.74.0
+ 6.0.0-pre014
Units.NET BrakeSpecificFuelConsumption - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework brakespecificfuelconsumption unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/packages.config b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/BrakeSpecificFuelConsumption/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec
deleted file mode 100644
index e63aca35b1..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/UnitsNet.NanoFramework.Capacitance.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.Capacitance
- 5.74.0
- Units.NET Capacitance - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds Capacitance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework capacitance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Capacitance/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/CoefficientOfThermalExpansion.nfproj b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/CoefficientOfThermalExpansion.nfproj
index 95887ec612..79a008978a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/CoefficientOfThermalExpansion.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/CoefficientOfThermalExpansion.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec
index 043d3f4e4e..15278dd300 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/UnitsNet.NanoFramework.CoefficientOfThermalExpansion.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.CoefficientOfThermalExpansion
- 5.74.0
+ 6.0.0-pre014
Units.NET CoefficientOfThermalExpansion - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework coefficientofthermalexpansion unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/packages.config b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/CoefficientOfThermalExpansion/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/Compressibility.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/Compressibility.nfproj
index 2813f8d18d..ebb1c5d80a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/Compressibility.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/Compressibility.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec
index 540d282b6c..ac884f5edd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/UnitsNet.NanoFramework.Compressibility.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Compressibility
- 5.74.0
+ 6.0.0-pre014
Units.NET Compressibility - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework compressibility unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Compressibility/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Compressibility/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Density/Density.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Density/Density.nfproj
index 78d5d43398..6504ae163a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Density/Density.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Density/Density.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec
index c809206c40..08b1dfe6d7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Density/UnitsNet.NanoFramework.Density.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Density
- 5.74.0
+ 6.0.0-pre014
Units.NET Density - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework density unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Density/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Density/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Density/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Density/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/DoseAreaProduct.nfproj b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/DoseAreaProduct.nfproj
index 4c01bc517b..a7fc062361 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/DoseAreaProduct.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/DoseAreaProduct.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/UnitsNet.NanoFramework.DoseAreaProduct.nuspec b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/UnitsNet.NanoFramework.DoseAreaProduct.nuspec
index 4a0022d046..875bfd3013 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/UnitsNet.NanoFramework.DoseAreaProduct.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/UnitsNet.NanoFramework.DoseAreaProduct.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.DoseAreaProduct
- 5.74.0
+ 6.0.0-pre014
Units.NET DoseAreaProduct - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework doseareaproduct unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/packages.config b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/DoseAreaProduct/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Duration/Duration.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Duration/Duration.nfproj
index 213d76240b..136d72670a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Duration/Duration.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Duration/Duration.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec
index 7e0bc0e6f3..5e7ba019d6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Duration/UnitsNet.NanoFramework.Duration.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Duration
- 5.74.0
+ 6.0.0-pre014
Units.NET Duration - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework duration unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Duration/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Duration/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Duration/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Duration/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/DynamicViscosity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/DynamicViscosity.nfproj
index 2fe36eecba..53a2b83c1a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/DynamicViscosity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/DynamicViscosity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec
index 8da92d1ae2..cbb9d92953 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/UnitsNet.NanoFramework.DynamicViscosity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.DynamicViscosity
- 5.74.0
+ 6.0.0-pre014
Units.NET DynamicViscosity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework dynamicviscosity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/DynamicViscosity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/ElectricAdmittance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/ElectricAdmittance.nfproj
index 1791c5ce89..40a40885d9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/ElectricAdmittance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/ElectricAdmittance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec
index 84b65c4786..9d1c849b02 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/UnitsNet.NanoFramework.ElectricAdmittance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricAdmittance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricAdmittance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricadmittance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricAdmittance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj
index ab6610adce..ea49fc048a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/ElectricApparentEnergy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
index 8031789937..d679fb775a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/UnitsNet.NanoFramework.ElectricApparentEnergy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricApparentEnergy
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricApparentEnergy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricapparentenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentEnergy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj
index 835791a26d..fef4baa953 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/ElectricApparentPower.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
index bc4fce83c1..6a4ba0ebda 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/UnitsNet.NanoFramework.ElectricApparentPower.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricApparentPower
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricApparentPower - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricapparentpower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricApparentPower/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj
index 60df6a44c5..61417e0504 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/ElectricCapacitance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
index 02fc88f243..3bdafb4c71 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/UnitsNet.NanoFramework.ElectricCapacitance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricCapacitance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricCapacitance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electriccapacitance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCapacitance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/ElectricCharge.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/ElectricCharge.nfproj
index 021e1344b0..bd0c8832b0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/ElectricCharge.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/ElectricCharge.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec
index 58bb771b7d..a80fd195a9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/UnitsNet.NanoFramework.ElectricCharge.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricCharge
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricCharge - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electriccharge unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCharge/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/ElectricChargeDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/ElectricChargeDensity.nfproj
index ec1971226f..71ce0c440a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/ElectricChargeDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/ElectricChargeDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec
index 213071d4c5..74dda5ebbf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/UnitsNet.NanoFramework.ElectricChargeDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricChargeDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricChargeDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricchargedensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricChargeDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/ElectricConductance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/ElectricConductance.nfproj
index fb7ba7a578..cbfbd2043d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/ElectricConductance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/ElectricConductance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec
index bd6bdd45ef..67688cfe2f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/UnitsNet.NanoFramework.ElectricConductance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricConductance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricConductance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricconductance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/ElectricConductivity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/ElectricConductivity.nfproj
index 77b8a91b8b..6587be2ba4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/ElectricConductivity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/ElectricConductivity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec
index 1c00d79d9b..48c4debf1c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/UnitsNet.NanoFramework.ElectricConductivity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricConductivity
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricConductivity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricconductivity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricConductivity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/ElectricCurrent.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/ElectricCurrent.nfproj
index acbbf376dd..d1f437921d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/ElectricCurrent.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/ElectricCurrent.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec
index b5707175ba..76759903b3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/UnitsNet.NanoFramework.ElectricCurrent.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricCurrent
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricCurrent - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electriccurrent unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrent/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/ElectricCurrentDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/ElectricCurrentDensity.nfproj
index b89d6c9911..6a9d434df8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/ElectricCurrentDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/ElectricCurrentDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec
index a1b2ccb0a2..bed14a2e03 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/UnitsNet.NanoFramework.ElectricCurrentDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricCurrentDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricCurrentDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electriccurrentdensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/ElectricCurrentGradient.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/ElectricCurrentGradient.nfproj
index fbeb65fbe2..eb6cce87c4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/ElectricCurrentGradient.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/ElectricCurrentGradient.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec
index f04eeb2c6b..d07fff9cc7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/UnitsNet.NanoFramework.ElectricCurrentGradient.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricCurrentGradient
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricCurrentGradient - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electriccurrentgradient unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricCurrentGradient/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/ElectricField.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/ElectricField.nfproj
index 5495016531..1c29c5ce03 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/ElectricField.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/ElectricField.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec
index 81632be809..fe245ae6f7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/UnitsNet.NanoFramework.ElectricField.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricField
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricField - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricfield unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricField/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricField/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj
index 2d7d2e21de..e2416e308f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/ElectricImpedance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
index f6028c3ded..0416237ab1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/UnitsNet.NanoFramework.ElectricImpedance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricImpedance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricImpedance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricimpedance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricImpedance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/ElectricInductance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/ElectricInductance.nfproj
index 75d330d78c..c6619bfc35 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/ElectricInductance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/ElectricInductance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec
index 09e624af78..10ba1d1378 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/UnitsNet.NanoFramework.ElectricInductance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricInductance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricInductance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricinductance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricInductance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/ElectricPotential.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/ElectricPotential.nfproj
index bd40b9feb7..5589dc359d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/ElectricPotential.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/ElectricPotential.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec
index c9e7c5a245..333d674690 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/UnitsNet.NanoFramework.ElectricPotential.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricPotential
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricPotential - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricpotential unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotential/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/ElectricPotentialAc.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/ElectricPotentialAc.nfproj
deleted file mode 100644
index 19731e1376..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/ElectricPotentialAc.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {ab1339ec-f1d8-6abf-093e-1525ee231a9d}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ElectricPotentialAc
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec
deleted file mode 100644
index f03d212432..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/UnitsNet.NanoFramework.ElectricPotentialAc.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ElectricPotentialAc
- 5.74.0
- Units.NET ElectricPotentialAc - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ElectricPotentialAc units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework electricpotentialac unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialAc/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/ElectricPotentialChangeRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/ElectricPotentialChangeRate.nfproj
index 2dd516416d..7cf75a41be 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/ElectricPotentialChangeRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/ElectricPotentialChangeRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec
index f107b35e29..cf29317e9c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/UnitsNet.NanoFramework.ElectricPotentialChangeRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricPotentialChangeRate
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricPotentialChangeRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricpotentialchangerate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialChangeRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/ElectricPotentialDc.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/ElectricPotentialDc.nfproj
deleted file mode 100644
index 4c65918132..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/ElectricPotentialDc.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {27ebf863-3ee7-ddb0-08ab-8577438a8f1c}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ElectricPotentialDc
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec
deleted file mode 100644
index 72d5be6910..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/UnitsNet.NanoFramework.ElectricPotentialDc.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ElectricPotentialDc
- 5.74.0
- Units.NET ElectricPotentialDc - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ElectricPotentialDc units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework electricpotentialdc unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricPotentialDc/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj
index 346b902d18..137639125f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/ElectricReactance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
index 9fcfada626..edbfc90625 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/UnitsNet.NanoFramework.ElectricReactance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricReactance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricReactance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricreactance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj
index b5619d3273..c159133d3b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/ElectricReactiveEnergy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
index 1569172b59..dcb0c9b5d5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/UnitsNet.NanoFramework.ElectricReactiveEnergy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricReactiveEnergy
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricReactiveEnergy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricreactiveenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactiveEnergy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj
index 861fc00c7c..f8385b3418 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/ElectricReactivePower.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
index 1a7c4efba1..ab42aa7d65 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/UnitsNet.NanoFramework.ElectricReactivePower.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricReactivePower
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricReactivePower - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricreactivepower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricReactivePower/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/ElectricResistance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/ElectricResistance.nfproj
index 506008a6fe..76f6a402bb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/ElectricResistance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/ElectricResistance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec
index 62820bce13..6724413a8f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/UnitsNet.NanoFramework.ElectricResistance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricResistance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricResistance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricresistance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/ElectricResistivity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/ElectricResistivity.nfproj
index 462a5bf808..cd32dec60c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/ElectricResistivity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/ElectricResistivity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec
index 3e139c6d48..47894f6a0f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/UnitsNet.NanoFramework.ElectricResistivity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricResistivity
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricResistivity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricresistivity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricResistivity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/ElectricSurfaceChargeDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/ElectricSurfaceChargeDensity.nfproj
index afc94c8302..3c92cdc31d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/ElectricSurfaceChargeDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/ElectricSurfaceChargeDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec
index 293314251e..8d04ae28b7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/UnitsNet.NanoFramework.ElectricSurfaceChargeDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricSurfaceChargeDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricSurfaceChargeDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricsurfacechargedensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSurfaceChargeDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj
index 8f507cabd3..09618e3e01 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/ElectricSusceptance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
index 844b64652c..7081f6fb1a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/UnitsNet.NanoFramework.ElectricSusceptance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ElectricSusceptance
- 5.74.0
+ 6.0.0-pre014
Units.NET ElectricSusceptance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework electricsusceptance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ElectricSusceptance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Energy/Energy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Energy/Energy.nfproj
index 735e9975e3..e69dea0a99 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Energy/Energy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Energy/Energy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec
index a8048a83d5..79fdd94b7b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Energy/UnitsNet.NanoFramework.Energy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Energy
- 5.74.0
+ 6.0.0-pre014
Units.NET Energy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework energy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Energy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Energy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Energy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Energy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/EnergyDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/EnergyDensity.nfproj
index 7a47e9f105..b3cd35bc0f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/EnergyDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/EnergyDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec
index d18196c3ba..beaaba9189 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/UnitsNet.NanoFramework.EnergyDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.EnergyDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET EnergyDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework energydensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/EnergyDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Entropy/Entropy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Entropy/Entropy.nfproj
index d229d4e01d..56edc687f8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Entropy/Entropy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Entropy/Entropy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec
index 61e7d00c67..6e924c5eb6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Entropy/UnitsNet.NanoFramework.Entropy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Entropy
- 5.74.0
+ 6.0.0-pre014
Units.NET Entropy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework entropy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Entropy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Entropy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Entropy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Entropy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/FluidResistance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/FluidResistance.nfproj
index 93548b2970..6fae96c9b0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/FluidResistance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/FluidResistance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/UnitsNet.NanoFramework.FluidResistance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/UnitsNet.NanoFramework.FluidResistance.nuspec
index c8f529b2c5..97b2589a4a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/UnitsNet.NanoFramework.FluidResistance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/UnitsNet.NanoFramework.FluidResistance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.FluidResistance
- 5.74.0
+ 6.0.0-pre014
Units.NET FluidResistance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework fluidresistance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/FluidResistance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Force/Force.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Force/Force.nfproj
index 4c0eeb8855..c946bc8867 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Force/Force.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Force/Force.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec
index cd9d453fda..564aa09370 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Force/UnitsNet.NanoFramework.Force.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Force
- 5.74.0
+ 6.0.0-pre014
Units.NET Force - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework force unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Force/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Force/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Force/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Force/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/ForceChangeRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/ForceChangeRate.nfproj
index 44abf81279..77415e3855 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/ForceChangeRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/ForceChangeRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec
index 4cd076a16f..38d17c6779 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/UnitsNet.NanoFramework.ForceChangeRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ForceChangeRate
- 5.74.0
+ 6.0.0-pre014
Units.NET ForceChangeRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework forcechangerate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForceChangeRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/ForcePerLength.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/ForcePerLength.nfproj
index 008696fda0..cfff78dff5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/ForcePerLength.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/ForcePerLength.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec
index 5b9c4a6798..0cded9870c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/UnitsNet.NanoFramework.ForcePerLength.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ForcePerLength
- 5.74.0
+ 6.0.0-pre014
Units.NET ForcePerLength - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework forceperlength unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ForcePerLength/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Frequency/Frequency.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Frequency/Frequency.nfproj
index 1d55989b61..7bcf739711 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Frequency/Frequency.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Frequency/Frequency.nfproj
@@ -24,13 +24,13 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
-
- ..\packages\nanoFramework.System.Math.1.5.116\lib\System.Math.dll
+
+ ..\packages\nanoFramework.System.Math.1.5.43\lib\System.Math.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec
index 868d0c688e..5eaeb9c890 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Frequency/UnitsNet.NanoFramework.Frequency.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Frequency
- 5.74.0
+ 6.0.0-pre014
Units.NET Frequency - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,8 +17,8 @@
en-US
nanoframework frequency unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Frequency/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Frequency/packages.config
index 53c5907746..ac11548cd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Frequency/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Frequency/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/FuelEfficiency.nfproj b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/FuelEfficiency.nfproj
index e7bbb86425..c40c99e01c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/FuelEfficiency.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/FuelEfficiency.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec
index beb14583de..4cd698c446 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/UnitsNet.NanoFramework.FuelEfficiency.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.FuelEfficiency
- 5.74.0
+ 6.0.0-pre014
Units.NET FuelEfficiency - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework fuelefficiency unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/packages.config b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/FuelEfficiency/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/HeatFlux.nfproj b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/HeatFlux.nfproj
index 3d1e46fe12..a0bedc7a33 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/HeatFlux.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/HeatFlux.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec
index ac400793ae..6e9c816575 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/UnitsNet.NanoFramework.HeatFlux.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.HeatFlux
- 5.74.0
+ 6.0.0-pre014
Units.NET HeatFlux - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework heatflux unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/packages.config b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatFlux/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/HeatTransferCoefficient.nfproj b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/HeatTransferCoefficient.nfproj
index eec88a3e58..845c91293c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/HeatTransferCoefficient.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/HeatTransferCoefficient.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec
index 8d7ec2c3fe..10a8009d42 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/UnitsNet.NanoFramework.HeatTransferCoefficient.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.HeatTransferCoefficient
- 5.74.0
+ 6.0.0-pre014
Units.NET HeatTransferCoefficient - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework heattransfercoefficient unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/packages.config b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/HeatTransferCoefficient/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/Illuminance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/Illuminance.nfproj
index 562fe6b5a1..f0a6385fdd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/Illuminance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/Illuminance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec
index 3fa6e0aef1..07ff176459 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/UnitsNet.NanoFramework.Illuminance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Illuminance
- 5.74.0
+ 6.0.0-pre014
Units.NET Illuminance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework illuminance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Illuminance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Illuminance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Impulse/Impulse.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Impulse/Impulse.nfproj
index eb4a7ad959..d07e0a0535 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Impulse/Impulse.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Impulse/Impulse.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec
index ab6887cb78..f0cfb5c508 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Impulse/UnitsNet.NanoFramework.Impulse.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Impulse
- 5.74.0
+ 6.0.0-pre014
Units.NET Impulse - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework impulse unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Impulse/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Impulse/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Impulse/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Impulse/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Information/Information.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Information/Information.nfproj
index dd40e9cfc3..78af2c9fed 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Information/Information.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Information/Information.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec
index db841222b1..eb264ad8d0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Information/UnitsNet.NanoFramework.Information.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Information
- 5.74.0
+ 6.0.0-pre014
Units.NET Information - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework information unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Information/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Information/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Information/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Information/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/Irradiance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/Irradiance.nfproj
index 5ee3915665..ce02ea1bbf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/Irradiance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/Irradiance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec
index b9de125d43..9ec8c4e452 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/UnitsNet.NanoFramework.Irradiance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Irradiance
- 5.74.0
+ 6.0.0-pre014
Units.NET Irradiance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework irradiance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/Irradiation.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/Irradiation.nfproj
index 1c83f450af..117c66f673 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/Irradiation.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/Irradiation.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec
index 81bbfea4f4..6f0cfcae7e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/UnitsNet.NanoFramework.Irradiation.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Irradiation
- 5.74.0
+ 6.0.0-pre014
Units.NET Irradiation - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework irradiation unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Irradiation/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Irradiation/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Jerk/Jerk.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Jerk/Jerk.nfproj
index f097e87a26..ea42f6f028 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Jerk/Jerk.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Jerk/Jerk.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec
index 6a71563235..5793eed4cb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Jerk/UnitsNet.NanoFramework.Jerk.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Jerk
- 5.74.0
+ 6.0.0-pre014
Units.NET Jerk - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework jerk unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Jerk/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Jerk/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Jerk/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Jerk/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/KinematicViscosity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/KinematicViscosity.nfproj
index 4b03ffe9e4..35fa23bf26 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/KinematicViscosity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/KinematicViscosity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec
index 768423df4f..75cd0ec628 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/UnitsNet.NanoFramework.KinematicViscosity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.KinematicViscosity
- 5.74.0
+ 6.0.0-pre014
Units.NET KinematicViscosity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework kinematicviscosity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/KinematicViscosity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/LapseRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/LapseRate.nfproj
index 41bf54a8c4..3850203729 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/LapseRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/LapseRate.nfproj
@@ -27,8 +27,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec
index 3963433c88..b41e248032 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/UnitsNet.NanoFramework.LapseRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LapseRate
- 5.74.0
+ 6.0.0-pre014
Units.NET LapseRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/packages.config
index ddcc0baa5a..e668a28c82 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LapseRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LapseRate/packages.config
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/LeakRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/LeakRate.nfproj
index 89f6e95d33..08304711aa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/LeakRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/LeakRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec
index 8cfb685756..7d71b9cdd8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/UnitsNet.NanoFramework.LeakRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LeakRate
- 5.74.0
+ 6.0.0-pre014
Units.NET LeakRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework leakrate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LeakRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LeakRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Length/Length.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Length/Length.nfproj
index fc73848458..6c8cc1f31e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Length/Length.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Length/Length.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec
index 70f0176906..afb6371a89 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Length/UnitsNet.NanoFramework.Length.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Length
- 5.74.0
+ 6.0.0-pre014
Units.NET Length - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework length unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Length/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Length/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Length/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Length/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Level/Level.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Level/Level.nfproj
index 75294341ec..8dde41ee0e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Level/Level.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Level/Level.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec
index 7037cd443f..232e0f2290 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Level/UnitsNet.NanoFramework.Level.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Level
- 5.74.0
+ 6.0.0-pre014
Units.NET Level - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework level unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Level/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Level/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Level/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Level/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/LinearDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/LinearDensity.nfproj
index 58147a0469..ee9ffc2cf3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/LinearDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/LinearDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec
index 0fc0d75fb5..d729436f49 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/UnitsNet.NanoFramework.LinearDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LinearDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET LinearDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework lineardensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/LinearPowerDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/LinearPowerDensity.nfproj
index b8ef8026ba..78306a5cd9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/LinearPowerDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/LinearPowerDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec
index 043e5baffb..67bbeed00c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/UnitsNet.NanoFramework.LinearPowerDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LinearPowerDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET LinearPowerDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework linearpowerdensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LinearPowerDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminance/Luminance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Luminance/Luminance.nfproj
index 6281729434..8c9e3eb890 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminance/Luminance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminance/Luminance.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec
index d8fb4d89f9..98ff162366 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminance/UnitsNet.NanoFramework.Luminance.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Luminance
- 5.74.0
+ 6.0.0-pre014
Units.NET Luminance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework luminance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Luminance/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminance/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminance/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/Luminosity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/Luminosity.nfproj
index 0f909a9587..bb88ca9e48 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/Luminosity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/Luminosity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec
index 32334bf2c6..ba40cc2a7a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/UnitsNet.NanoFramework.Luminosity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Luminosity
- 5.74.0
+ 6.0.0-pre014
Units.NET Luminosity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework luminosity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Luminosity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Luminosity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/LuminousFlux.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/LuminousFlux.nfproj
index 6e4a398567..09471e380f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/LuminousFlux.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/LuminousFlux.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec
index f806fbd9c9..182df4570f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/UnitsNet.NanoFramework.LuminousFlux.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LuminousFlux
- 5.74.0
+ 6.0.0-pre014
Units.NET LuminousFlux - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework luminousflux unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousFlux/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/LuminousIntensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/LuminousIntensity.nfproj
index 7f841d9256..c154d235b2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/LuminousIntensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/LuminousIntensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec
index 263126b496..7744ab7312 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/UnitsNet.NanoFramework.LuminousIntensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.LuminousIntensity
- 5.74.0
+ 6.0.0-pre014
Units.NET LuminousIntensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework luminousintensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/LuminousIntensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/MagneticField.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/MagneticField.nfproj
index 9b41808958..afa5742359 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/MagneticField.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/MagneticField.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec
index 6c05f51344..586026889f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/UnitsNet.NanoFramework.MagneticField.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MagneticField
- 5.74.0
+ 6.0.0-pre014
Units.NET MagneticField - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework magneticfield unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticField/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticField/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/MagneticFlux.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/MagneticFlux.nfproj
index 55c397997a..df2191383d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/MagneticFlux.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/MagneticFlux.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec
index df213b694b..d6ca4eaa3f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/UnitsNet.NanoFramework.MagneticFlux.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MagneticFlux
- 5.74.0
+ 6.0.0-pre014
Units.NET MagneticFlux - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework magneticflux unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MagneticFlux/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/Magnetization.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/Magnetization.nfproj
index 48b1448ee5..8d43ca4a84 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/Magnetization.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/Magnetization.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec
index 271325a93c..043e1be4cf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/UnitsNet.NanoFramework.Magnetization.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Magnetization
- 5.74.0
+ 6.0.0-pre014
Units.NET Magnetization - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework magnetization unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Magnetization/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Magnetization/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Mass/Mass.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Mass/Mass.nfproj
index 3360b16b26..48eee658c6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Mass/Mass.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Mass/Mass.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec
index 032bd17042..2421f44c5c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Mass/UnitsNet.NanoFramework.Mass.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Mass
- 5.74.0
+ 6.0.0-pre014
Units.NET Mass - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework mass unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Mass/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Mass/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Mass/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Mass/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/MassConcentration.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/MassConcentration.nfproj
index e1880b5f44..dc87caea11 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/MassConcentration.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/MassConcentration.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec
index 13bbd0ad61..4d25397f79 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/UnitsNet.NanoFramework.MassConcentration.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MassConcentration
- 5.74.0
+ 6.0.0-pre014
Units.NET MassConcentration - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework massconcentration unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassConcentration/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/MassFlow.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/MassFlow.nfproj
index c869443582..7c7373e41a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/MassFlow.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/MassFlow.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec
index 12858fc45a..6499d1a893 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/UnitsNet.NanoFramework.MassFlow.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MassFlow
- 5.74.0
+ 6.0.0-pre014
Units.NET MassFlow - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework massflow unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlow/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlow/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/MassFlux.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/MassFlux.nfproj
index e163764467..d957a14c66 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/MassFlux.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/MassFlux.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec
index 2ede8fd994..2bf4ee8481 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/UnitsNet.NanoFramework.MassFlux.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MassFlux
- 5.74.0
+ 6.0.0-pre014
Units.NET MassFlux - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework massflux unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFlux/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFlux/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/MassFraction.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/MassFraction.nfproj
index 86cda29b9d..400e772446 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/MassFraction.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/MassFraction.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec
index cf55a275e0..347ce6fc83 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/UnitsNet.NanoFramework.MassFraction.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MassFraction
- 5.74.0
+ 6.0.0-pre014
Units.NET MassFraction - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework massfraction unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassFraction/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassFraction/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/MassMomentOfInertia.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/MassMomentOfInertia.nfproj
index ab9f423158..acc7dab6b2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/MassMomentOfInertia.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/MassMomentOfInertia.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec
index 18a9cde02b..c5ccfb56d3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/UnitsNet.NanoFramework.MassMomentOfInertia.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MassMomentOfInertia
- 5.74.0
+ 6.0.0-pre014
Units.NET MassMomentOfInertia - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework massmomentofinertia unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MassMomentOfInertia/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molality/Molality.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Molality/Molality.nfproj
index 5fa7cb5b70..0a503cfec7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molality/Molality.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molality/Molality.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec
index 9f03b9a025..ad8d5d3c1d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molality/UnitsNet.NanoFramework.Molality.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Molality
- 5.74.0
+ 6.0.0-pre014
Units.NET Molality - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molality unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molality/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Molality/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molality/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molality/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/MolarEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/MolarEnergy.nfproj
index e135b0d405..232a3e819b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/MolarEnergy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/MolarEnergy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec
index 08df71eb6c..f4b14ed774 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/UnitsNet.NanoFramework.MolarEnergy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MolarEnergy
- 5.74.0
+ 6.0.0-pre014
Units.NET MolarEnergy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molarenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEnergy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/MolarEntropy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/MolarEntropy.nfproj
index abb7a0facc..19cd8579e3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/MolarEntropy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/MolarEntropy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec
index b2ff97ee9b..60499ad609 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/UnitsNet.NanoFramework.MolarEntropy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MolarEntropy
- 5.74.0
+ 6.0.0-pre014
Units.NET MolarEntropy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molarentropy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarEntropy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/MolarFlow.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/MolarFlow.nfproj
index 1ab9d0a34e..fad8c7ab6e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/MolarFlow.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/MolarFlow.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec
index f9bad45419..cec85197b7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/UnitsNet.NanoFramework.MolarFlow.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MolarFlow
- 5.74.0
+ 6.0.0-pre014
Units.NET MolarFlow - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molarflow unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarFlow/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/MolarMass.nfproj b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/MolarMass.nfproj
index 526121c185..e00ae77df6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/MolarMass.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/MolarMass.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec
index 5271ce3975..82cef1f362 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/UnitsNet.NanoFramework.MolarMass.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.MolarMass
- 5.74.0
+ 6.0.0-pre014
Units.NET MolarMass - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molarmass unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/packages.config b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/MolarMass/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/MolarMass/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molarity/Molarity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Molarity/Molarity.nfproj
index 8c0d753c44..66cfe427b2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molarity/Molarity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molarity/Molarity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec
index 66eccbfce4..4e780df7a0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molarity/UnitsNet.NanoFramework.Molarity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Molarity
- 5.74.0
+ 6.0.0-pre014
Units.NET Molarity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework molarity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Molarity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Molarity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Molarity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Molarity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permeability/Permeability.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Permeability/Permeability.nfproj
index 5a37b21a45..b8b4752e0a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permeability/Permeability.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permeability/Permeability.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec
index ad33131d82..6e5303a75a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permeability/UnitsNet.NanoFramework.Permeability.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Permeability
- 5.74.0
+ 6.0.0-pre014
Units.NET Permeability - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework permeability unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permeability/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Permeability/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permeability/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permeability/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/Permittivity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/Permittivity.nfproj
index 2816324130..9ab3a135b8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/Permittivity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/Permittivity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec
index 3d48f7baa5..5fde349cd1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/UnitsNet.NanoFramework.Permittivity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Permittivity
- 5.74.0
+ 6.0.0-pre014
Units.NET Permittivity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework permittivity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Permittivity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Permittivity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/PorousMediumPermeability.nfproj b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/PorousMediumPermeability.nfproj
index 66cbfb43e0..3cadb26e91 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/PorousMediumPermeability.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/PorousMediumPermeability.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec
index ac73158f5c..6bbd55881b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/UnitsNet.NanoFramework.PorousMediumPermeability.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.PorousMediumPermeability
- 5.74.0
+ 6.0.0-pre014
Units.NET PorousMediumPermeability - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework porousmediumpermeability unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/packages.config b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/PorousMediumPermeability/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Power/Power.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Power/Power.nfproj
index 66fc82934a..026113ba1d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Power/Power.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Power/Power.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec
index 78598871ac..f474c4ad30 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Power/UnitsNet.NanoFramework.Power.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Power
- 5.74.0
+ 6.0.0-pre014
Units.NET Power - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework power unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Power/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Power/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Power/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Power/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/PowerDensity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/PowerDensity.nfproj
index 33f4e3dfa5..3a77007078 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/PowerDensity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/PowerDensity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec
index 1f72d28684..23c740e78b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/UnitsNet.NanoFramework.PowerDensity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.PowerDensity
- 5.74.0
+ 6.0.0-pre014
Units.NET PowerDensity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework powerdensity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerDensity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/PowerRatio.nfproj b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/PowerRatio.nfproj
index f9a20ad1b3..1b10b7e724 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/PowerRatio.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/PowerRatio.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec
index 9a565c8214..91bc971ac0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/UnitsNet.NanoFramework.PowerRatio.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.PowerRatio
- 5.74.0
+ 6.0.0-pre014
Units.NET PowerRatio - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework powerratio unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/packages.config b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/PowerRatio/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Pressure/Pressure.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Pressure/Pressure.nfproj
index 2284a2059f..fd6578c3cd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Pressure/Pressure.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Pressure/Pressure.nfproj
@@ -24,13 +24,13 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
-
- ..\packages\nanoFramework.System.Math.1.5.116\lib\System.Math.dll
+
+ ..\packages\nanoFramework.System.Math.1.5.43\lib\System.Math.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec
index 75b0e37267..60c9a970a8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Pressure/UnitsNet.NanoFramework.Pressure.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Pressure
- 5.74.0
+ 6.0.0-pre014
Units.NET Pressure - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,8 +17,8 @@
en-US
nanoframework pressure unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Pressure/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Pressure/packages.config
index 53c5907746..ac11548cd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Pressure/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Pressure/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/PressureChangeRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/PressureChangeRate.nfproj
index a979df5c7c..33bd6a8461 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/PressureChangeRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/PressureChangeRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec
index a1216b5525..1493410f72 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/UnitsNet.NanoFramework.PressureChangeRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.PressureChangeRate
- 5.74.0
+ 6.0.0-pre014
Units.NET PressureChangeRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework pressurechangerate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/PressureChangeRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Properties/AssemblyInfo.cs b/UnitsNet.NanoFramework/GeneratedCode/Properties/AssemblyInfo.cs
index 99441d036b..afb97626fd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Properties/AssemblyInfo.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Properties/AssemblyInfo.cs
@@ -47,8 +47,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("5.74.0")]
-[assembly: AssemblyFileVersion("5.74.0")]
+[assembly: AssemblyVersion("6.0.0")]
+[assembly: AssemblyFileVersion("6.0.0")]
//////////////////////////////////////////////////
// This assembly doens't require native support //
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
index bc55a24c69..03fba175c3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AbsorbedDoseOfIonizingRadiation.g.cs
@@ -54,7 +54,6 @@ public struct AbsorbedDoseOfIonizingRadiation
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public AbsorbedDoseOfIonizingRadiation(double value, AbsorbedDoseOfIonizingRadiationUnit unit)
{
_value = value;
@@ -169,97 +168,81 @@ public AbsorbedDoseOfIonizingRadiation(double value, AbsorbedDoseOfIonizingRadia
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromCentigrays(double centigrays) => new AbsorbedDoseOfIonizingRadiation(centigrays, AbsorbedDoseOfIonizingRadiationUnit.Centigray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromFemtograys(double femtograys) => new AbsorbedDoseOfIonizingRadiation(femtograys, AbsorbedDoseOfIonizingRadiationUnit.Femtogray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromGigagrays(double gigagrays) => new AbsorbedDoseOfIonizingRadiation(gigagrays, AbsorbedDoseOfIonizingRadiationUnit.Gigagray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromGrays(double grays) => new AbsorbedDoseOfIonizingRadiation(grays, AbsorbedDoseOfIonizingRadiationUnit.Gray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromKilograys(double kilograys) => new AbsorbedDoseOfIonizingRadiation(kilograys, AbsorbedDoseOfIonizingRadiationUnit.Kilogray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromKilorads(double kilorads) => new AbsorbedDoseOfIonizingRadiation(kilorads, AbsorbedDoseOfIonizingRadiationUnit.Kilorad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromMegagrays(double megagrays) => new AbsorbedDoseOfIonizingRadiation(megagrays, AbsorbedDoseOfIonizingRadiationUnit.Megagray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromMegarads(double megarads) => new AbsorbedDoseOfIonizingRadiation(megarads, AbsorbedDoseOfIonizingRadiationUnit.Megarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromMicrograys(double micrograys) => new AbsorbedDoseOfIonizingRadiation(micrograys, AbsorbedDoseOfIonizingRadiationUnit.Microgray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromMilligrays(double milligrays) => new AbsorbedDoseOfIonizingRadiation(milligrays, AbsorbedDoseOfIonizingRadiationUnit.Milligray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromMillirads(double millirads) => new AbsorbedDoseOfIonizingRadiation(millirads, AbsorbedDoseOfIonizingRadiationUnit.Millirad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromNanograys(double nanograys) => new AbsorbedDoseOfIonizingRadiation(nanograys, AbsorbedDoseOfIonizingRadiationUnit.Nanogray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromPetagrays(double petagrays) => new AbsorbedDoseOfIonizingRadiation(petagrays, AbsorbedDoseOfIonizingRadiationUnit.Petagray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromPicograys(double picograys) => new AbsorbedDoseOfIonizingRadiation(picograys, AbsorbedDoseOfIonizingRadiationUnit.Picogray);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromRads(double rads) => new AbsorbedDoseOfIonizingRadiation(rads, AbsorbedDoseOfIonizingRadiationUnit.Rad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AbsorbedDoseOfIonizingRadiation FromTeragrays(double teragrays) => new AbsorbedDoseOfIonizingRadiation(teragrays, AbsorbedDoseOfIonizingRadiationUnit.Teragray);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Acceleration.g.cs
index 39a70e0bc8..7bf91533ff 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Acceleration.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Acceleration.g.cs
@@ -51,7 +51,6 @@ public struct Acceleration
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Acceleration(double value, AccelerationUnit unit)
{
_value = value;
@@ -156,85 +155,71 @@ public Acceleration(double value, AccelerationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromCentimetersPerSecondSquared(double centimeterspersecondsquared) => new Acceleration(centimeterspersecondsquared, AccelerationUnit.CentimeterPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromDecimetersPerSecondSquared(double decimeterspersecondsquared) => new Acceleration(decimeterspersecondsquared, AccelerationUnit.DecimeterPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromFeetPerSecondSquared(double feetpersecondsquared) => new Acceleration(feetpersecondsquared, AccelerationUnit.FootPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromInchesPerSecondSquared(double inchespersecondsquared) => new Acceleration(inchespersecondsquared, AccelerationUnit.InchPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromKilometersPerSecondSquared(double kilometerspersecondsquared) => new Acceleration(kilometerspersecondsquared, AccelerationUnit.KilometerPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromKnotsPerHour(double knotsperhour) => new Acceleration(knotsperhour, AccelerationUnit.KnotPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromKnotsPerMinute(double knotsperminute) => new Acceleration(knotsperminute, AccelerationUnit.KnotPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromKnotsPerSecond(double knotspersecond) => new Acceleration(knotspersecond, AccelerationUnit.KnotPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromMetersPerSecondSquared(double meterspersecondsquared) => new Acceleration(meterspersecondsquared, AccelerationUnit.MeterPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromMicrometersPerSecondSquared(double micrometerspersecondsquared) => new Acceleration(micrometerspersecondsquared, AccelerationUnit.MicrometerPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromMillimetersPerSecondSquared(double millimeterspersecondsquared) => new Acceleration(millimeterspersecondsquared, AccelerationUnit.MillimeterPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromMillistandardGravity(double millistandardgravity) => new Acceleration(millistandardgravity, AccelerationUnit.MillistandardGravity);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromNanometersPerSecondSquared(double nanometerspersecondsquared) => new Acceleration(nanometerspersecondsquared, AccelerationUnit.NanometerPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Acceleration FromStandardGravity(double standardgravity) => new Acceleration(standardgravity, AccelerationUnit.StandardGravity);
///
@@ -282,9 +267,9 @@ private double GetValueInBaseUnit()
AccelerationUnit.FootPerSecondSquared => _value * 0.304800,
AccelerationUnit.InchPerSecondSquared => _value * 0.0254,
AccelerationUnit.KilometerPerSecondSquared => (_value) * 1e3d,
- AccelerationUnit.KnotPerHour => _value * 0.5144444444444 / 3600,
- AccelerationUnit.KnotPerMinute => _value * 0.5144444444444 / 60,
- AccelerationUnit.KnotPerSecond => _value * 0.5144444444444,
+ AccelerationUnit.KnotPerHour => _value * (1852.0 / 3600.0) / 3600,
+ AccelerationUnit.KnotPerMinute => _value * (1852.0 / 3600.0) / 60,
+ AccelerationUnit.KnotPerSecond => _value * (1852.0 / 3600.0),
AccelerationUnit.MeterPerSecondSquared => _value,
AccelerationUnit.MicrometerPerSecondSquared => (_value) * 1e-6d,
AccelerationUnit.MillimeterPerSecondSquared => (_value) * 1e-3d,
@@ -309,9 +294,9 @@ private double GetValueAs(AccelerationUnit unit)
AccelerationUnit.FootPerSecondSquared => baseUnitValue / 0.304800,
AccelerationUnit.InchPerSecondSquared => baseUnitValue / 0.0254,
AccelerationUnit.KilometerPerSecondSquared => (baseUnitValue) / 1e3d,
- AccelerationUnit.KnotPerHour => baseUnitValue / 0.5144444444444 * 3600,
- AccelerationUnit.KnotPerMinute => baseUnitValue / 0.5144444444444 * 60,
- AccelerationUnit.KnotPerSecond => baseUnitValue / 0.5144444444444,
+ AccelerationUnit.KnotPerHour => baseUnitValue * 3600 / (1852.0 / 3600.0),
+ AccelerationUnit.KnotPerMinute => baseUnitValue * 60 / (1852.0 / 3600.0),
+ AccelerationUnit.KnotPerSecond => baseUnitValue / (1852.0 / 3600.0),
AccelerationUnit.MeterPerSecondSquared => baseUnitValue,
AccelerationUnit.MicrometerPerSecondSquared => (baseUnitValue) / 1e-6d,
AccelerationUnit.MillimeterPerSecondSquared => (baseUnitValue) / 1e-3d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmountOfSubstance.g.cs
index 6e667b1162..b3cc6d1bba 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmountOfSubstance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmountOfSubstance.g.cs
@@ -51,7 +51,6 @@ public struct AmountOfSubstance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public AmountOfSubstance(double value, AmountOfSubstanceUnit unit)
{
_value = value;
@@ -171,103 +170,86 @@ public AmountOfSubstance(double value, AmountOfSubstanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromCentimoles(double centimoles) => new AmountOfSubstance(centimoles, AmountOfSubstanceUnit.Centimole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromCentipoundMoles(double centipoundmoles) => new AmountOfSubstance(centipoundmoles, AmountOfSubstanceUnit.CentipoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromDecimoles(double decimoles) => new AmountOfSubstance(decimoles, AmountOfSubstanceUnit.Decimole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromDecipoundMoles(double decipoundmoles) => new AmountOfSubstance(decipoundmoles, AmountOfSubstanceUnit.DecipoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromFemtomoles(double femtomoles) => new AmountOfSubstance(femtomoles, AmountOfSubstanceUnit.Femtomole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromKilomoles(double kilomoles) => new AmountOfSubstance(kilomoles, AmountOfSubstanceUnit.Kilomole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromKilopoundMoles(double kilopoundmoles) => new AmountOfSubstance(kilopoundmoles, AmountOfSubstanceUnit.KilopoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMegamoles(double megamoles) => new AmountOfSubstance(megamoles, AmountOfSubstanceUnit.Megamole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMicromoles(double micromoles) => new AmountOfSubstance(micromoles, AmountOfSubstanceUnit.Micromole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMicropoundMoles(double micropoundmoles) => new AmountOfSubstance(micropoundmoles, AmountOfSubstanceUnit.MicropoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMillimoles(double millimoles) => new AmountOfSubstance(millimoles, AmountOfSubstanceUnit.Millimole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMillipoundMoles(double millipoundmoles) => new AmountOfSubstance(millipoundmoles, AmountOfSubstanceUnit.MillipoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromMoles(double moles) => new AmountOfSubstance(moles, AmountOfSubstanceUnit.Mole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromNanomoles(double nanomoles) => new AmountOfSubstance(nanomoles, AmountOfSubstanceUnit.Nanomole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromNanopoundMoles(double nanopoundmoles) => new AmountOfSubstance(nanopoundmoles, AmountOfSubstanceUnit.NanopoundMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromPicomoles(double picomoles) => new AmountOfSubstance(picomoles, AmountOfSubstanceUnit.Picomole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmountOfSubstance FromPoundMoles(double poundmoles) => new AmountOfSubstance(poundmoles, AmountOfSubstanceUnit.PoundMole);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmplitudeRatio.g.cs
index a8e6bd531a..b4a36620e3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmplitudeRatio.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AmplitudeRatio.g.cs
@@ -51,7 +51,6 @@ public struct AmplitudeRatio
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public AmplitudeRatio(double value, AmplitudeRatioUnit unit)
{
_value = value;
@@ -106,25 +105,21 @@ public AmplitudeRatio(double value, AmplitudeRatioUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmplitudeRatio FromDecibelMicrovolts(double decibelmicrovolts) => new AmplitudeRatio(decibelmicrovolts, AmplitudeRatioUnit.DecibelMicrovolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmplitudeRatio FromDecibelMillivolts(double decibelmillivolts) => new AmplitudeRatio(decibelmillivolts, AmplitudeRatioUnit.DecibelMillivolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmplitudeRatio FromDecibelsUnloaded(double decibelsunloaded) => new AmplitudeRatio(decibelsunloaded, AmplitudeRatioUnit.DecibelUnloaded);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AmplitudeRatio FromDecibelVolts(double decibelvolts) => new AmplitudeRatio(decibelvolts, AmplitudeRatioUnit.DecibelVolt);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Angle.g.cs
index 57eba04098..f85ae494fe 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Angle.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Angle.g.cs
@@ -51,7 +51,6 @@ public struct Angle
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Angle(double value, AngleUnit unit)
{
_value = value;
@@ -61,7 +60,7 @@ public Angle(double value, AngleUnit unit)
///
/// The base unit of Angle, which is Second. All conversions go via this value.
///
- public static AngleUnit BaseUnit { get; } = AngleUnit.Degree;
+ public static AngleUnit BaseUnit { get; } = AngleUnit.Radian;
///
/// Represents the largest possible value of Angle.
@@ -154,11 +153,6 @@ public Angle(double value, AngleUnit unit)
///
public double Revolutions => As(AngleUnit.Revolution);
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Tilt => As(AngleUnit.Tilt);
-
#endregion
#region Static Factory Methods
@@ -166,99 +160,78 @@ public Angle(double value, AngleUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromArcminutes(double arcminutes) => new Angle(arcminutes, AngleUnit.Arcminute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromArcseconds(double arcseconds) => new Angle(arcseconds, AngleUnit.Arcsecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromCentiradians(double centiradians) => new Angle(centiradians, AngleUnit.Centiradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromDeciradians(double deciradians) => new Angle(deciradians, AngleUnit.Deciradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromDegrees(double degrees) => new Angle(degrees, AngleUnit.Degree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromGradians(double gradians) => new Angle(gradians, AngleUnit.Gradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromMicrodegrees(double microdegrees) => new Angle(microdegrees, AngleUnit.Microdegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromMicroradians(double microradians) => new Angle(microradians, AngleUnit.Microradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromMillidegrees(double millidegrees) => new Angle(millidegrees, AngleUnit.Millidegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromMilliradians(double milliradians) => new Angle(milliradians, AngleUnit.Milliradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromNanodegrees(double nanodegrees) => new Angle(nanodegrees, AngleUnit.Nanodegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromNanoradians(double nanoradians) => new Angle(nanoradians, AngleUnit.Nanoradian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromNatoMils(double natomils) => new Angle(natomils, AngleUnit.NatoMil);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromRadians(double radians) => new Angle(radians, AngleUnit.Radian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Angle FromRevolutions(double revolutions) => new Angle(revolutions, AngleUnit.Revolution);
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Angle FromTilt(double tilt) => new Angle(tilt, AngleUnit.Tilt);
-
///
/// Dynamically convert from value and unit enum to .
///
@@ -299,22 +272,21 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- AngleUnit.Arcminute => _value / 60,
- AngleUnit.Arcsecond => _value / 3600,
- AngleUnit.Centiradian => (_value * 180 / 3.1415926535897931) * 1e-2d,
- AngleUnit.Deciradian => (_value * 180 / 3.1415926535897931) * 1e-1d,
- AngleUnit.Degree => _value,
- AngleUnit.Gradian => _value * 0.9,
- AngleUnit.Microdegree => (_value) * 1e-6d,
- AngleUnit.Microradian => (_value * 180 / 3.1415926535897931) * 1e-6d,
- AngleUnit.Millidegree => (_value) * 1e-3d,
- AngleUnit.Milliradian => (_value * 180 / 3.1415926535897931) * 1e-3d,
- AngleUnit.Nanodegree => (_value) * 1e-9d,
- AngleUnit.Nanoradian => (_value * 180 / 3.1415926535897931) * 1e-9d,
- AngleUnit.NatoMil => _value * 9 / 160,
- AngleUnit.Radian => _value * 180 / 3.1415926535897931,
- AngleUnit.Revolution => _value * 360,
- AngleUnit.Tilt => Math.Asin(_value) * 180 / 3.1415926535897931,
+ AngleUnit.Arcminute => _value * 3.1415926535897931 / (60 * 180),
+ AngleUnit.Arcsecond => _value * 3.1415926535897931 / (3600 * 180),
+ AngleUnit.Centiradian => (_value) * 1e-2d,
+ AngleUnit.Deciradian => (_value) * 1e-1d,
+ AngleUnit.Degree => _value * 3.1415926535897931 / 180,
+ AngleUnit.Gradian => _value * 3.1415926535897931 / 200,
+ AngleUnit.Microdegree => (_value * 3.1415926535897931 / 180) * 1e-6d,
+ AngleUnit.Microradian => (_value) * 1e-6d,
+ AngleUnit.Millidegree => (_value * 3.1415926535897931 / 180) * 1e-3d,
+ AngleUnit.Milliradian => (_value) * 1e-3d,
+ AngleUnit.Nanodegree => (_value * 3.1415926535897931 / 180) * 1e-9d,
+ AngleUnit.Nanoradian => (_value) * 1e-9d,
+ AngleUnit.NatoMil => _value * 3.1415926535897931 / 3200,
+ AngleUnit.Radian => _value,
+ AngleUnit.Revolution => _value * 2 * 3.1415926535897931,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -328,22 +300,21 @@ private double GetValueAs(AngleUnit unit)
return unit switch
{
- AngleUnit.Arcminute => baseUnitValue * 60,
- AngleUnit.Arcsecond => baseUnitValue * 3600,
- AngleUnit.Centiradian => (baseUnitValue / 180 * 3.1415926535897931) / 1e-2d,
- AngleUnit.Deciradian => (baseUnitValue / 180 * 3.1415926535897931) / 1e-1d,
- AngleUnit.Degree => baseUnitValue,
- AngleUnit.Gradian => baseUnitValue / 0.9,
- AngleUnit.Microdegree => (baseUnitValue) / 1e-6d,
- AngleUnit.Microradian => (baseUnitValue / 180 * 3.1415926535897931) / 1e-6d,
- AngleUnit.Millidegree => (baseUnitValue) / 1e-3d,
- AngleUnit.Milliradian => (baseUnitValue / 180 * 3.1415926535897931) / 1e-3d,
- AngleUnit.Nanodegree => (baseUnitValue) / 1e-9d,
- AngleUnit.Nanoradian => (baseUnitValue / 180 * 3.1415926535897931) / 1e-9d,
- AngleUnit.NatoMil => baseUnitValue * 160 / 9,
- AngleUnit.Radian => baseUnitValue / 180 * 3.1415926535897931,
- AngleUnit.Revolution => baseUnitValue / 360,
- AngleUnit.Tilt => Math.Sin(baseUnitValue / 180 * 3.1415926535897931),
+ AngleUnit.Arcminute => baseUnitValue * 60 * 180 / 3.1415926535897931,
+ AngleUnit.Arcsecond => baseUnitValue * 3600 * 180 / 3.1415926535897931,
+ AngleUnit.Centiradian => (baseUnitValue) / 1e-2d,
+ AngleUnit.Deciradian => (baseUnitValue) / 1e-1d,
+ AngleUnit.Degree => baseUnitValue * 180 / 3.1415926535897931,
+ AngleUnit.Gradian => baseUnitValue * 200 / 3.1415926535897931,
+ AngleUnit.Microdegree => (baseUnitValue * 180 / 3.1415926535897931) / 1e-6d,
+ AngleUnit.Microradian => (baseUnitValue) / 1e-6d,
+ AngleUnit.Millidegree => (baseUnitValue * 180 / 3.1415926535897931) / 1e-3d,
+ AngleUnit.Milliradian => (baseUnitValue) / 1e-3d,
+ AngleUnit.Nanodegree => (baseUnitValue * 180 / 3.1415926535897931) / 1e-9d,
+ AngleUnit.Nanoradian => (baseUnitValue) / 1e-9d,
+ AngleUnit.NatoMil => baseUnitValue * 3200 / 3.1415926535897931,
+ AngleUnit.Radian => baseUnitValue,
+ AngleUnit.Revolution => baseUnitValue / (2 * 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs
deleted file mode 100644
index 6da6fa1ecd..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentEnergy.g.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// A unit for expressing the integral of apparent power over time, equal to the product of 1 volt-ampere and 1 hour, or to 3600 joules.
- ///
- ///
- /// ApparentEnergy has been renamed to ElectricApparentEnergy , and will be removed in a later major version.
- ///
- [Obsolete("ApparentEnergy has been renamed to ElectricApparentEnergy, and will be removed in a later major version.")]
- public struct ApparentEnergy
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ApparentEnergyUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ApparentEnergyUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ApparentEnergy(double value, ApparentEnergyUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ApparentEnergy, which is Second. All conversions go via this value.
- ///
- public static ApparentEnergyUnit BaseUnit { get; } = ApparentEnergyUnit.VoltampereHour;
-
- ///
- /// Represents the largest possible value of ApparentEnergy.
- ///
- public static ApparentEnergy MaxValue { get; } = new ApparentEnergy(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ApparentEnergy.
- ///
- public static ApparentEnergy MinValue { get; } = new ApparentEnergy(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ApparentEnergy Zero { get; } = new ApparentEnergy(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double KilovoltampereHours => As(ApparentEnergyUnit.KilovoltampereHour);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MegavoltampereHours => As(ApparentEnergyUnit.MegavoltampereHour);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double VoltampereHours => As(ApparentEnergyUnit.VoltampereHour);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentEnergy FromKilovoltampereHours(double kilovoltamperehours) => new ApparentEnergy(kilovoltamperehours, ApparentEnergyUnit.KilovoltampereHour);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentEnergy FromMegavoltampereHours(double megavoltamperehours) => new ApparentEnergy(megavoltamperehours, ApparentEnergyUnit.MegavoltampereHour);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentEnergy FromVoltampereHours(double voltamperehours) => new ApparentEnergy(voltamperehours, ApparentEnergyUnit.VoltampereHour);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ApparentEnergy unit value.
- public static ApparentEnergy From(double value, ApparentEnergyUnit fromUnit)
- {
- return new ApparentEnergy(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ApparentEnergyUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ApparentEnergy to another ApparentEnergy with the unit representation .
- ///
- /// A ApparentEnergy with the specified unit.
- public ApparentEnergy ToUnit(ApparentEnergyUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ApparentEnergy(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ApparentEnergyUnit.KilovoltampereHour => (_value) * 1e3d,
- ApparentEnergyUnit.MegavoltampereHour => (_value) * 1e6d,
- ApparentEnergyUnit.VoltampereHour => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ApparentEnergyUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ApparentEnergyUnit.KilovoltampereHour => (baseUnitValue) / 1e3d,
- ApparentEnergyUnit.MegavoltampereHour => (baseUnitValue) / 1e6d,
- ApparentEnergyUnit.VoltampereHour => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs
deleted file mode 100644
index fd5e587ec3..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ApparentPower.g.cs
+++ /dev/null
@@ -1,228 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. Apparent power is the product of the root-mean-square of voltage and current.
- ///
- ///
- /// ApparentPower has been renamed to ElectricApparentPower , and will be removed in a later major version.
- ///
- [Obsolete("ApparentPower has been renamed to ElectricApparentPower, and will be removed in a later major version.")]
- public struct ApparentPower
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ApparentPowerUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ApparentPowerUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ApparentPower(double value, ApparentPowerUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ApparentPower, which is Second. All conversions go via this value.
- ///
- public static ApparentPowerUnit BaseUnit { get; } = ApparentPowerUnit.Voltampere;
-
- ///
- /// Represents the largest possible value of ApparentPower.
- ///
- public static ApparentPower MaxValue { get; } = new ApparentPower(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ApparentPower.
- ///
- public static ApparentPower MinValue { get; } = new ApparentPower(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ApparentPower Zero { get; } = new ApparentPower(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Gigavoltamperes => As(ApparentPowerUnit.Gigavoltampere);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Kilovoltamperes => As(ApparentPowerUnit.Kilovoltampere);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Megavoltamperes => As(ApparentPowerUnit.Megavoltampere);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Microvoltamperes => As(ApparentPowerUnit.Microvoltampere);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Millivoltamperes => As(ApparentPowerUnit.Millivoltampere);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Voltamperes => As(ApparentPowerUnit.Voltampere);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromGigavoltamperes(double gigavoltamperes) => new ApparentPower(gigavoltamperes, ApparentPowerUnit.Gigavoltampere);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromKilovoltamperes(double kilovoltamperes) => new ApparentPower(kilovoltamperes, ApparentPowerUnit.Kilovoltampere);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromMegavoltamperes(double megavoltamperes) => new ApparentPower(megavoltamperes, ApparentPowerUnit.Megavoltampere);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromMicrovoltamperes(double microvoltamperes) => new ApparentPower(microvoltamperes, ApparentPowerUnit.Microvoltampere);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromMillivoltamperes(double millivoltamperes) => new ApparentPower(millivoltamperes, ApparentPowerUnit.Millivoltampere);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ApparentPower FromVoltamperes(double voltamperes) => new ApparentPower(voltamperes, ApparentPowerUnit.Voltampere);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ApparentPower unit value.
- public static ApparentPower From(double value, ApparentPowerUnit fromUnit)
- {
- return new ApparentPower(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ApparentPowerUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ApparentPower to another ApparentPower with the unit representation .
- ///
- /// A ApparentPower with the specified unit.
- public ApparentPower ToUnit(ApparentPowerUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ApparentPower(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ApparentPowerUnit.Gigavoltampere => (_value) * 1e9d,
- ApparentPowerUnit.Kilovoltampere => (_value) * 1e3d,
- ApparentPowerUnit.Megavoltampere => (_value) * 1e6d,
- ApparentPowerUnit.Microvoltampere => (_value) * 1e-6d,
- ApparentPowerUnit.Millivoltampere => (_value) * 1e-3d,
- ApparentPowerUnit.Voltampere => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ApparentPowerUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ApparentPowerUnit.Gigavoltampere => (baseUnitValue) / 1e9d,
- ApparentPowerUnit.Kilovoltampere => (baseUnitValue) / 1e3d,
- ApparentPowerUnit.Megavoltampere => (baseUnitValue) / 1e6d,
- ApparentPowerUnit.Microvoltampere => (baseUnitValue) / 1e-6d,
- ApparentPowerUnit.Millivoltampere => (baseUnitValue) / 1e-3d,
- ApparentPowerUnit.Voltampere => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Area.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Area.g.cs
index 9f9b66b333..a3904127cd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Area.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Area.g.cs
@@ -51,7 +51,6 @@ public struct Area
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Area(double value, AreaUnit unit)
{
_value = value;
@@ -156,85 +155,71 @@ public Area(double value, AreaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromAcres(double acres) => new Area(acres, AreaUnit.Acre);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromHectares(double hectares) => new Area(hectares, AreaUnit.Hectare);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareCentimeters(double squarecentimeters) => new Area(squarecentimeters, AreaUnit.SquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareDecimeters(double squaredecimeters) => new Area(squaredecimeters, AreaUnit.SquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareFeet(double squarefeet) => new Area(squarefeet, AreaUnit.SquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareInches(double squareinches) => new Area(squareinches, AreaUnit.SquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareKilometers(double squarekilometers) => new Area(squarekilometers, AreaUnit.SquareKilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareMeters(double squaremeters) => new Area(squaremeters, AreaUnit.SquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareMicrometers(double squaremicrometers) => new Area(squaremicrometers, AreaUnit.SquareMicrometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareMiles(double squaremiles) => new Area(squaremiles, AreaUnit.SquareMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareMillimeters(double squaremillimeters) => new Area(squaremillimeters, AreaUnit.SquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareNauticalMiles(double squarenauticalmiles) => new Area(squarenauticalmiles, AreaUnit.SquareNauticalMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromSquareYards(double squareyards) => new Area(squareyards, AreaUnit.SquareYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Area FromUsSurveySquareFeet(double ussurveysquarefeet) => new Area(ussurveysquarefeet, AreaUnit.UsSurveySquareFoot);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaDensity.g.cs
index 5f0225683a..5d66bcb2c1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaDensity.g.cs
@@ -51,7 +51,6 @@ public struct AreaDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public AreaDensity(double value, AreaDensityUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public AreaDensity(double value, AreaDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaDensity FromGramsPerSquareMeter(double gramspersquaremeter) => new AreaDensity(gramspersquaremeter, AreaDensityUnit.GramPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaDensity FromKilogramsPerSquareMeter(double kilogramspersquaremeter) => new AreaDensity(kilogramspersquaremeter, AreaDensityUnit.KilogramPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaDensity FromMilligramsPerSquareMeter(double milligramspersquaremeter) => new AreaDensity(milligramspersquaremeter, AreaDensityUnit.MilligramPerSquareMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
index 6fb794c162..57cd9b6df7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs
@@ -51,7 +51,6 @@ public struct AreaMomentOfInertia
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public AreaMomentOfInertia(double value, AreaMomentOfInertiaUnit unit)
{
_value = value;
@@ -116,37 +115,31 @@ public AreaMomentOfInertia(double value, AreaMomentOfInertiaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromCentimetersToTheFourth(double centimeterstothefourth) => new AreaMomentOfInertia(centimeterstothefourth, AreaMomentOfInertiaUnit.CentimeterToTheFourth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromDecimetersToTheFourth(double decimeterstothefourth) => new AreaMomentOfInertia(decimeterstothefourth, AreaMomentOfInertiaUnit.DecimeterToTheFourth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromFeetToTheFourth(double feettothefourth) => new AreaMomentOfInertia(feettothefourth, AreaMomentOfInertiaUnit.FootToTheFourth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromInchesToTheFourth(double inchestothefourth) => new AreaMomentOfInertia(inchestothefourth, AreaMomentOfInertiaUnit.InchToTheFourth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromMetersToTheFourth(double meterstothefourth) => new AreaMomentOfInertia(meterstothefourth, AreaMomentOfInertiaUnit.MeterToTheFourth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static AreaMomentOfInertia FromMillimetersToTheFourth(double millimeterstothefourth) => new AreaMomentOfInertia(millimeterstothefourth, AreaMomentOfInertiaUnit.MillimeterToTheFourth);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/BitRate.g.cs
index f126853b67..894d66b3b4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/BitRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/BitRate.g.cs
@@ -54,7 +54,6 @@ public struct BitRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public BitRate(double value, BitRateUnit unit)
{
_value = value;
@@ -69,12 +68,12 @@ public BitRate(double value, BitRateUnit unit)
///
/// Represents the largest possible value of BitRate.
///
- public static BitRate MaxValue { get; } = new BitRate(79228162514264337593543950335d, BaseUnit);
+ public static BitRate MaxValue { get; } = new BitRate(double.MaxValue, BaseUnit);
///
/// Represents the smallest possible value of BitRate.
///
- public static BitRate MinValue { get; } = new BitRate(-79228162514264337593543950335d, BaseUnit);
+ public static BitRate MinValue { get; } = new BitRate(double.MinValue, BaseUnit);
///
/// Gets an instance of this quantity with a value of 0 in the base unit Second.
@@ -219,157 +218,131 @@ public BitRate(double value, BitRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromBitsPerSecond(double bitspersecond) => new BitRate(bitspersecond, BitRateUnit.BitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromBytesPerSecond(double bytespersecond) => new BitRate(bytespersecond, BitRateUnit.BytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromExabitsPerSecond(double exabitspersecond) => new BitRate(exabitspersecond, BitRateUnit.ExabitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromExabytesPerSecond(double exabytespersecond) => new BitRate(exabytespersecond, BitRateUnit.ExabytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromExbibitsPerSecond(double exbibitspersecond) => new BitRate(exbibitspersecond, BitRateUnit.ExbibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromExbibytesPerSecond(double exbibytespersecond) => new BitRate(exbibytespersecond, BitRateUnit.ExbibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromGibibitsPerSecond(double gibibitspersecond) => new BitRate(gibibitspersecond, BitRateUnit.GibibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromGibibytesPerSecond(double gibibytespersecond) => new BitRate(gibibytespersecond, BitRateUnit.GibibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromGigabitsPerSecond(double gigabitspersecond) => new BitRate(gigabitspersecond, BitRateUnit.GigabitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromGigabytesPerSecond(double gigabytespersecond) => new BitRate(gigabytespersecond, BitRateUnit.GigabytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromKibibitsPerSecond(double kibibitspersecond) => new BitRate(kibibitspersecond, BitRateUnit.KibibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromKibibytesPerSecond(double kibibytespersecond) => new BitRate(kibibytespersecond, BitRateUnit.KibibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromKilobitsPerSecond(double kilobitspersecond) => new BitRate(kilobitspersecond, BitRateUnit.KilobitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromKilobytesPerSecond(double kilobytespersecond) => new BitRate(kilobytespersecond, BitRateUnit.KilobytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromMebibitsPerSecond(double mebibitspersecond) => new BitRate(mebibitspersecond, BitRateUnit.MebibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromMebibytesPerSecond(double mebibytespersecond) => new BitRate(mebibytespersecond, BitRateUnit.MebibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromMegabitsPerSecond(double megabitspersecond) => new BitRate(megabitspersecond, BitRateUnit.MegabitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromMegabytesPerSecond(double megabytespersecond) => new BitRate(megabytespersecond, BitRateUnit.MegabytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromPebibitsPerSecond(double pebibitspersecond) => new BitRate(pebibitspersecond, BitRateUnit.PebibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromPebibytesPerSecond(double pebibytespersecond) => new BitRate(pebibytespersecond, BitRateUnit.PebibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromPetabitsPerSecond(double petabitspersecond) => new BitRate(petabitspersecond, BitRateUnit.PetabitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromPetabytesPerSecond(double petabytespersecond) => new BitRate(petabytespersecond, BitRateUnit.PetabytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromTebibitsPerSecond(double tebibitspersecond) => new BitRate(tebibitspersecond, BitRateUnit.TebibitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromTebibytesPerSecond(double tebibytespersecond) => new BitRate(tebibytespersecond, BitRateUnit.TebibytePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromTerabitsPerSecond(double terabitspersecond) => new BitRate(terabitspersecond, BitRateUnit.TerabitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BitRate FromTerabytesPerSecond(double terabytespersecond) => new BitRate(terabytespersecond, BitRateUnit.TerabytePerSecond);
///
@@ -413,31 +386,31 @@ private double GetValueInBaseUnit()
return Unit switch
{
BitRateUnit.BitPerSecond => _value,
- BitRateUnit.BytePerSecond => _value * 8d,
+ BitRateUnit.BytePerSecond => _value * 8,
BitRateUnit.ExabitPerSecond => (_value) * 1e18d,
- BitRateUnit.ExabytePerSecond => (_value * 8d) * 1e18d,
+ BitRateUnit.ExabytePerSecond => (_value * 8) * 1e18d,
BitRateUnit.ExbibitPerSecond => (_value) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
- BitRateUnit.ExbibytePerSecond => (_value * 8d) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
+ BitRateUnit.ExbibytePerSecond => (_value * 8) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
BitRateUnit.GibibitPerSecond => (_value) * (1024d * 1024 * 1024),
- BitRateUnit.GibibytePerSecond => (_value * 8d) * (1024d * 1024 * 1024),
+ BitRateUnit.GibibytePerSecond => (_value * 8) * (1024d * 1024 * 1024),
BitRateUnit.GigabitPerSecond => (_value) * 1e9d,
- BitRateUnit.GigabytePerSecond => (_value * 8d) * 1e9d,
+ BitRateUnit.GigabytePerSecond => (_value * 8) * 1e9d,
BitRateUnit.KibibitPerSecond => (_value) * 1024d,
- BitRateUnit.KibibytePerSecond => (_value * 8d) * 1024d,
+ BitRateUnit.KibibytePerSecond => (_value * 8) * 1024d,
BitRateUnit.KilobitPerSecond => (_value) * 1e3d,
- BitRateUnit.KilobytePerSecond => (_value * 8d) * 1e3d,
+ BitRateUnit.KilobytePerSecond => (_value * 8) * 1e3d,
BitRateUnit.MebibitPerSecond => (_value) * (1024d * 1024),
- BitRateUnit.MebibytePerSecond => (_value * 8d) * (1024d * 1024),
+ BitRateUnit.MebibytePerSecond => (_value * 8) * (1024d * 1024),
BitRateUnit.MegabitPerSecond => (_value) * 1e6d,
- BitRateUnit.MegabytePerSecond => (_value * 8d) * 1e6d,
+ BitRateUnit.MegabytePerSecond => (_value * 8) * 1e6d,
BitRateUnit.PebibitPerSecond => (_value) * (1024d * 1024 * 1024 * 1024 * 1024),
- BitRateUnit.PebibytePerSecond => (_value * 8d) * (1024d * 1024 * 1024 * 1024 * 1024),
+ BitRateUnit.PebibytePerSecond => (_value * 8) * (1024d * 1024 * 1024 * 1024 * 1024),
BitRateUnit.PetabitPerSecond => (_value) * 1e15d,
- BitRateUnit.PetabytePerSecond => (_value * 8d) * 1e15d,
+ BitRateUnit.PetabytePerSecond => (_value * 8) * 1e15d,
BitRateUnit.TebibitPerSecond => (_value) * (1024d * 1024 * 1024 * 1024),
- BitRateUnit.TebibytePerSecond => (_value * 8d) * (1024d * 1024 * 1024 * 1024),
+ BitRateUnit.TebibytePerSecond => (_value * 8) * (1024d * 1024 * 1024 * 1024),
BitRateUnit.TerabitPerSecond => (_value) * 1e12d,
- BitRateUnit.TerabytePerSecond => (_value * 8d) * 1e12d,
+ BitRateUnit.TerabytePerSecond => (_value * 8) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -452,31 +425,31 @@ private double GetValueAs(BitRateUnit unit)
return unit switch
{
BitRateUnit.BitPerSecond => baseUnitValue,
- BitRateUnit.BytePerSecond => baseUnitValue / 8d,
+ BitRateUnit.BytePerSecond => baseUnitValue / 8,
BitRateUnit.ExabitPerSecond => (baseUnitValue) / 1e18d,
- BitRateUnit.ExabytePerSecond => (baseUnitValue / 8d) / 1e18d,
+ BitRateUnit.ExabytePerSecond => (baseUnitValue / 8) / 1e18d,
BitRateUnit.ExbibitPerSecond => (baseUnitValue) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
- BitRateUnit.ExbibytePerSecond => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
+ BitRateUnit.ExbibytePerSecond => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
BitRateUnit.GibibitPerSecond => (baseUnitValue) / (1024d * 1024 * 1024),
- BitRateUnit.GibibytePerSecond => (baseUnitValue / 8d) / (1024d * 1024 * 1024),
+ BitRateUnit.GibibytePerSecond => (baseUnitValue / 8) / (1024d * 1024 * 1024),
BitRateUnit.GigabitPerSecond => (baseUnitValue) / 1e9d,
- BitRateUnit.GigabytePerSecond => (baseUnitValue / 8d) / 1e9d,
+ BitRateUnit.GigabytePerSecond => (baseUnitValue / 8) / 1e9d,
BitRateUnit.KibibitPerSecond => (baseUnitValue) / 1024d,
- BitRateUnit.KibibytePerSecond => (baseUnitValue / 8d) / 1024d,
+ BitRateUnit.KibibytePerSecond => (baseUnitValue / 8) / 1024d,
BitRateUnit.KilobitPerSecond => (baseUnitValue) / 1e3d,
- BitRateUnit.KilobytePerSecond => (baseUnitValue / 8d) / 1e3d,
+ BitRateUnit.KilobytePerSecond => (baseUnitValue / 8) / 1e3d,
BitRateUnit.MebibitPerSecond => (baseUnitValue) / (1024d * 1024),
- BitRateUnit.MebibytePerSecond => (baseUnitValue / 8d) / (1024d * 1024),
+ BitRateUnit.MebibytePerSecond => (baseUnitValue / 8) / (1024d * 1024),
BitRateUnit.MegabitPerSecond => (baseUnitValue) / 1e6d,
- BitRateUnit.MegabytePerSecond => (baseUnitValue / 8d) / 1e6d,
+ BitRateUnit.MegabytePerSecond => (baseUnitValue / 8) / 1e6d,
BitRateUnit.PebibitPerSecond => (baseUnitValue) / (1024d * 1024 * 1024 * 1024 * 1024),
- BitRateUnit.PebibytePerSecond => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024 * 1024),
+ BitRateUnit.PebibytePerSecond => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024 * 1024),
BitRateUnit.PetabitPerSecond => (baseUnitValue) / 1e15d,
- BitRateUnit.PetabytePerSecond => (baseUnitValue / 8d) / 1e15d,
+ BitRateUnit.PetabytePerSecond => (baseUnitValue / 8) / 1e15d,
BitRateUnit.TebibitPerSecond => (baseUnitValue) / (1024d * 1024 * 1024 * 1024),
- BitRateUnit.TebibytePerSecond => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024),
+ BitRateUnit.TebibytePerSecond => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024),
BitRateUnit.TerabitPerSecond => (baseUnitValue) / 1e12d,
- BitRateUnit.TerabytePerSecond => (baseUnitValue / 8d) / 1e12d,
+ BitRateUnit.TerabytePerSecond => (baseUnitValue / 8) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
index 2ee14c79c8..4137957c99 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs
@@ -51,7 +51,6 @@ public struct BrakeSpecificFuelConsumption
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public BrakeSpecificFuelConsumption(double value, BrakeSpecificFuelConsumptionUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public BrakeSpecificFuelConsumption(double value, BrakeSpecificFuelConsumptionUn
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BrakeSpecificFuelConsumption FromGramsPerKiloWattHour(double gramsperkilowatthour) => new BrakeSpecificFuelConsumption(gramsperkilowatthour, BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BrakeSpecificFuelConsumption FromKilogramsPerJoule(double kilogramsperjoule) => new BrakeSpecificFuelConsumption(kilogramsperjoule, BrakeSpecificFuelConsumptionUnit.KilogramPerJoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static BrakeSpecificFuelConsumption FromPoundsPerMechanicalHorsepowerHour(double poundspermechanicalhorsepowerhour) => new BrakeSpecificFuelConsumption(poundspermechanicalhorsepowerhour, BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour);
///
@@ -158,7 +154,7 @@ private double GetValueInBaseUnit()
{
BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour => _value / 3.6e9,
BrakeSpecificFuelConsumptionUnit.KilogramPerJoule => _value,
- BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour => _value * 1.689659410672e-7,
+ BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour => _value * (0.45359237 / (76.0402249 * 9.80665))/3600,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -174,7 +170,7 @@ private double GetValueAs(BrakeSpecificFuelConsumptionUnit unit)
{
BrakeSpecificFuelConsumptionUnit.GramPerKiloWattHour => baseUnitValue * 3.6e9,
BrakeSpecificFuelConsumptionUnit.KilogramPerJoule => baseUnitValue,
- BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour => baseUnitValue / 1.689659410672e-7,
+ BrakeSpecificFuelConsumptionUnit.PoundPerMechanicalHorsepowerHour => baseUnitValue * 3600 / (0.45359237 / (76.0402249 * 9.80665)),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs
deleted file mode 100644
index cb6ea25ae0..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Capacitance.g.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// Capacitance is the ability of a body to store an electric charge.
- ///
- ///
- /// Capacitance has been renamed to ElectricCapacitance , and will be removed in a later major version.
- ///
- [Obsolete("Capacitance has been renamed to ElectricCapacitance, and will be removed in a later major version.")]
- public struct Capacitance
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly CapacitanceUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public CapacitanceUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public Capacitance(double value, CapacitanceUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of Capacitance, which is Second. All conversions go via this value.
- ///
- public static CapacitanceUnit BaseUnit { get; } = CapacitanceUnit.Farad;
-
- ///
- /// Represents the largest possible value of Capacitance.
- ///
- public static Capacitance MaxValue { get; } = new Capacitance(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of Capacitance.
- ///
- public static Capacitance MinValue { get; } = new Capacitance(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static Capacitance Zero { get; } = new Capacitance(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Farads => As(CapacitanceUnit.Farad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Kilofarads => As(CapacitanceUnit.Kilofarad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Megafarads => As(CapacitanceUnit.Megafarad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Microfarads => As(CapacitanceUnit.Microfarad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Millifarads => As(CapacitanceUnit.Millifarad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Nanofarads => As(CapacitanceUnit.Nanofarad);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double Picofarads => As(CapacitanceUnit.Picofarad);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromFarads(double farads) => new Capacitance(farads, CapacitanceUnit.Farad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromKilofarads(double kilofarads) => new Capacitance(kilofarads, CapacitanceUnit.Kilofarad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromMegafarads(double megafarads) => new Capacitance(megafarads, CapacitanceUnit.Megafarad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromMicrofarads(double microfarads) => new Capacitance(microfarads, CapacitanceUnit.Microfarad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromMillifarads(double millifarads) => new Capacitance(millifarads, CapacitanceUnit.Millifarad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromNanofarads(double nanofarads) => new Capacitance(nanofarads, CapacitanceUnit.Nanofarad);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Capacitance FromPicofarads(double picofarads) => new Capacitance(picofarads, CapacitanceUnit.Picofarad);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// Capacitance unit value.
- public static Capacitance From(double value, CapacitanceUnit fromUnit)
- {
- return new Capacitance(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(CapacitanceUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this Capacitance to another Capacitance with the unit representation .
- ///
- /// A Capacitance with the specified unit.
- public Capacitance ToUnit(CapacitanceUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new Capacitance(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- CapacitanceUnit.Farad => _value,
- CapacitanceUnit.Kilofarad => (_value) * 1e3d,
- CapacitanceUnit.Megafarad => (_value) * 1e6d,
- CapacitanceUnit.Microfarad => (_value) * 1e-6d,
- CapacitanceUnit.Millifarad => (_value) * 1e-3d,
- CapacitanceUnit.Nanofarad => (_value) * 1e-9d,
- CapacitanceUnit.Picofarad => (_value) * 1e-12d,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(CapacitanceUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- CapacitanceUnit.Farad => baseUnitValue,
- CapacitanceUnit.Kilofarad => (baseUnitValue) / 1e3d,
- CapacitanceUnit.Megafarad => (baseUnitValue) / 1e6d,
- CapacitanceUnit.Microfarad => (baseUnitValue) / 1e-6d,
- CapacitanceUnit.Millifarad => (baseUnitValue) / 1e-3d,
- CapacitanceUnit.Nanofarad => (baseUnitValue) / 1e-9d,
- CapacitanceUnit.Picofarad => (baseUnitValue) / 1e-12d,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
index bcba0baede..fb2d5e1a0a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs
@@ -51,7 +51,6 @@ public struct CoefficientOfThermalExpansion
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public CoefficientOfThermalExpansion(double value, CoefficientOfThermalExpansionUnit unit)
{
_value = value;
@@ -79,24 +78,6 @@ public CoefficientOfThermalExpansion(double value, CoefficientOfThermalExpansion
public static CoefficientOfThermalExpansion Zero { get; } = new CoefficientOfThermalExpansion(0, BaseUnit);
#region Conversion Properties
- ///
- /// Gets a value of this quantity converted into
- ///
- [Obsolete("Use PerDegreeCelsius instead.")]
- public double InverseDegreeCelsius => As(CoefficientOfThermalExpansionUnit.InverseDegreeCelsius);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- [Obsolete("Use PerDegreeFahrenheit instead.")]
- public double InverseDegreeFahrenheit => As(CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- [Obsolete("Use PerKelvin instead.")]
- public double InverseKelvin => As(CoefficientOfThermalExpansionUnit.InverseKelvin);
-
///
/// Gets a value of this quantity converted into
///
@@ -131,61 +112,34 @@ public CoefficientOfThermalExpansion(double value, CoefficientOfThermalExpansion
#region Static Factory Methods
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- [Obsolete("Use PerDegreeCelsius instead.")]
- public static CoefficientOfThermalExpansion FromInverseDegreeCelsius(double inversedegreecelsius) => new CoefficientOfThermalExpansion(inversedegreecelsius, CoefficientOfThermalExpansionUnit.InverseDegreeCelsius);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- [Obsolete("Use PerDegreeFahrenheit instead.")]
- public static CoefficientOfThermalExpansion FromInverseDegreeFahrenheit(double inversedegreefahrenheit) => new CoefficientOfThermalExpansion(inversedegreefahrenheit, CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- [Obsolete("Use PerKelvin instead.")]
- public static CoefficientOfThermalExpansion FromInverseKelvin(double inversekelvin) => new CoefficientOfThermalExpansion(inversekelvin, CoefficientOfThermalExpansionUnit.InverseKelvin);
-
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPerDegreeCelsius(double perdegreecelsius) => new CoefficientOfThermalExpansion(perdegreecelsius, CoefficientOfThermalExpansionUnit.PerDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPerDegreeFahrenheit(double perdegreefahrenheit) => new CoefficientOfThermalExpansion(perdegreefahrenheit, CoefficientOfThermalExpansionUnit.PerDegreeFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPerKelvin(double perkelvin) => new CoefficientOfThermalExpansion(perkelvin, CoefficientOfThermalExpansionUnit.PerKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPpmPerDegreeCelsius(double ppmperdegreecelsius) => new CoefficientOfThermalExpansion(ppmperdegreecelsius, CoefficientOfThermalExpansionUnit.PpmPerDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPpmPerDegreeFahrenheit(double ppmperdegreefahrenheit) => new CoefficientOfThermalExpansion(ppmperdegreefahrenheit, CoefficientOfThermalExpansionUnit.PpmPerDegreeFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static CoefficientOfThermalExpansion FromPpmPerKelvin(double ppmperkelvin) => new CoefficientOfThermalExpansion(ppmperkelvin, CoefficientOfThermalExpansionUnit.PpmPerKelvin);
///
@@ -228,9 +182,6 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- CoefficientOfThermalExpansionUnit.InverseDegreeCelsius => _value,
- CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit => _value * 9 / 5,
- CoefficientOfThermalExpansionUnit.InverseKelvin => _value,
CoefficientOfThermalExpansionUnit.PerDegreeCelsius => _value,
CoefficientOfThermalExpansionUnit.PerDegreeFahrenheit => _value * 9 / 5,
CoefficientOfThermalExpansionUnit.PerKelvin => _value,
@@ -250,9 +201,6 @@ private double GetValueAs(CoefficientOfThermalExpansionUnit unit)
return unit switch
{
- CoefficientOfThermalExpansionUnit.InverseDegreeCelsius => baseUnitValue,
- CoefficientOfThermalExpansionUnit.InverseDegreeFahrenheit => baseUnitValue * 5 / 9,
- CoefficientOfThermalExpansionUnit.InverseKelvin => baseUnitValue,
CoefficientOfThermalExpansionUnit.PerDegreeCelsius => baseUnitValue,
CoefficientOfThermalExpansionUnit.PerDegreeFahrenheit => baseUnitValue * 5 / 9,
CoefficientOfThermalExpansionUnit.PerKelvin => baseUnitValue,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Compressibility.g.cs
index c57a846d13..41bab30dbf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Compressibility.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Compressibility.g.cs
@@ -51,7 +51,6 @@ public struct Compressibility
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Compressibility(double value, CompressibilityUnit unit)
{
_value = value;
@@ -121,43 +120,36 @@ public Compressibility(double value, CompressibilityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInverseAtmospheres(double inverseatmospheres) => new Compressibility(inverseatmospheres, CompressibilityUnit.InverseAtmosphere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInverseBars(double inversebars) => new Compressibility(inversebars, CompressibilityUnit.InverseBar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInverseKilopascals(double inversekilopascals) => new Compressibility(inversekilopascals, CompressibilityUnit.InverseKilopascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInverseMegapascals(double inversemegapascals) => new Compressibility(inversemegapascals, CompressibilityUnit.InverseMegapascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInverseMillibars(double inversemillibars) => new Compressibility(inversemillibars, CompressibilityUnit.InverseMillibar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInversePascals(double inversepascals) => new Compressibility(inversepascals, CompressibilityUnit.InversePascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Compressibility FromInversePoundsForcePerSquareInch(double inversepoundsforcepersquareinch) => new Compressibility(inversepoundsforcepersquareinch, CompressibilityUnit.InversePoundForcePerSquareInch);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Density.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Density.g.cs
index 8f1fb81f70..ad290398de 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Density.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Density.g.cs
@@ -54,7 +54,6 @@ public struct Density
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Density(double value, DensityUnit unit)
{
_value = value;
@@ -85,7 +84,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double CentigramsPerDeciLiter => As(DensityUnit.CentigramPerDeciliter);
+ public double CentigramsPerDeciliter => As(DensityUnit.CentigramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -100,7 +99,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double DecigramsPerDeciLiter => As(DensityUnit.DecigramPerDeciliter);
+ public double DecigramsPerDeciliter => As(DensityUnit.DecigramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -115,7 +114,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double FemtogramsPerDeciLiter => As(DensityUnit.FemtogramPerDeciliter);
+ public double FemtogramsPerDeciliter => As(DensityUnit.FemtogramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -155,7 +154,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double GramsPerDeciLiter => As(DensityUnit.GramPerDeciliter);
+ public double GramsPerDeciliter => As(DensityUnit.GramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -210,7 +209,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double MicrogramsPerDeciLiter => As(DensityUnit.MicrogramPerDeciliter);
+ public double MicrogramsPerDeciliter => As(DensityUnit.MicrogramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -230,7 +229,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double MilligramsPerDeciLiter => As(DensityUnit.MilligramPerDeciliter);
+ public double MilligramsPerDeciliter => As(DensityUnit.MilligramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -245,7 +244,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double NanogramsPerDeciLiter => As(DensityUnit.NanogramPerDeciliter);
+ public double NanogramsPerDeciliter => As(DensityUnit.NanogramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -260,7 +259,7 @@ public Density(double value, DensityUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double PicogramsPerDeciLiter => As(DensityUnit.PicogramPerDeciliter);
+ public double PicogramsPerDeciliter => As(DensityUnit.PicogramPerDeciliter);
///
/// Gets a value of this quantity converted into
@@ -369,337 +368,281 @@ public Density(double value, DensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromCentigramsPerDeciLiter(double centigramsperdeciliter) => new Density(centigramsperdeciliter, DensityUnit.CentigramPerDeciliter);
+ public static Density FromCentigramsPerDeciliter(double centigramsperdeciliter) => new Density(centigramsperdeciliter, DensityUnit.CentigramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromCentigramsPerLiter(double centigramsperliter) => new Density(centigramsperliter, DensityUnit.CentigramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromCentigramsPerMilliliter(double centigramspermilliliter) => new Density(centigramspermilliliter, DensityUnit.CentigramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromDecigramsPerDeciLiter(double decigramsperdeciliter) => new Density(decigramsperdeciliter, DensityUnit.DecigramPerDeciliter);
+ public static Density FromDecigramsPerDeciliter(double decigramsperdeciliter) => new Density(decigramsperdeciliter, DensityUnit.DecigramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromDecigramsPerLiter(double decigramsperliter) => new Density(decigramsperliter, DensityUnit.DecigramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromDecigramsPerMilliliter(double decigramspermilliliter) => new Density(decigramspermilliliter, DensityUnit.DecigramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromFemtogramsPerDeciLiter(double femtogramsperdeciliter) => new Density(femtogramsperdeciliter, DensityUnit.FemtogramPerDeciliter);
+ public static Density FromFemtogramsPerDeciliter(double femtogramsperdeciliter) => new Density(femtogramsperdeciliter, DensityUnit.FemtogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromFemtogramsPerLiter(double femtogramsperliter) => new Density(femtogramsperliter, DensityUnit.FemtogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromFemtogramsPerMilliliter(double femtogramspermilliliter) => new Density(femtogramspermilliliter, DensityUnit.FemtogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerCubicCentimeter(double gramspercubiccentimeter) => new Density(gramspercubiccentimeter, DensityUnit.GramPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerCubicFoot(double gramspercubicfoot) => new Density(gramspercubicfoot, DensityUnit.GramPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerCubicInch(double gramspercubicinch) => new Density(gramspercubicinch, DensityUnit.GramPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerCubicMeter(double gramspercubicmeter) => new Density(gramspercubicmeter, DensityUnit.GramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerCubicMillimeter(double gramspercubicmillimeter) => new Density(gramspercubicmillimeter, DensityUnit.GramPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromGramsPerDeciLiter(double gramsperdeciliter) => new Density(gramsperdeciliter, DensityUnit.GramPerDeciliter);
+ public static Density FromGramsPerDeciliter(double gramsperdeciliter) => new Density(gramsperdeciliter, DensityUnit.GramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerLiter(double gramsperliter) => new Density(gramsperliter, DensityUnit.GramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromGramsPerMilliliter(double gramspermilliliter) => new Density(gramspermilliliter, DensityUnit.GramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilogramsPerCubicCentimeter(double kilogramspercubiccentimeter) => new Density(kilogramspercubiccentimeter, DensityUnit.KilogramPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilogramsPerCubicMeter(double kilogramspercubicmeter) => new Density(kilogramspercubicmeter, DensityUnit.KilogramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilogramsPerCubicMillimeter(double kilogramspercubicmillimeter) => new Density(kilogramspercubicmillimeter, DensityUnit.KilogramPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilogramsPerLiter(double kilogramsperliter) => new Density(kilogramsperliter, DensityUnit.KilogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilopoundsPerCubicFoot(double kilopoundspercubicfoot) => new Density(kilopoundspercubicfoot, DensityUnit.KilopoundPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilopoundsPerCubicInch(double kilopoundspercubicinch) => new Density(kilopoundspercubicinch, DensityUnit.KilopoundPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromKilopoundsPerCubicYard(double kilopoundspercubicyard) => new Density(kilopoundspercubicyard, DensityUnit.KilopoundPerCubicYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMicrogramsPerCubicMeter(double microgramspercubicmeter) => new Density(microgramspercubicmeter, DensityUnit.MicrogramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromMicrogramsPerDeciLiter(double microgramsperdeciliter) => new Density(microgramsperdeciliter, DensityUnit.MicrogramPerDeciliter);
+ public static Density FromMicrogramsPerDeciliter(double microgramsperdeciliter) => new Density(microgramsperdeciliter, DensityUnit.MicrogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMicrogramsPerLiter(double microgramsperliter) => new Density(microgramsperliter, DensityUnit.MicrogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMicrogramsPerMilliliter(double microgramspermilliliter) => new Density(microgramspermilliliter, DensityUnit.MicrogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMilligramsPerCubicMeter(double milligramspercubicmeter) => new Density(milligramspercubicmeter, DensityUnit.MilligramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromMilligramsPerDeciLiter(double milligramsperdeciliter) => new Density(milligramsperdeciliter, DensityUnit.MilligramPerDeciliter);
+ public static Density FromMilligramsPerDeciliter(double milligramsperdeciliter) => new Density(milligramsperdeciliter, DensityUnit.MilligramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMilligramsPerLiter(double milligramsperliter) => new Density(milligramsperliter, DensityUnit.MilligramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromMilligramsPerMilliliter(double milligramspermilliliter) => new Density(milligramspermilliliter, DensityUnit.MilligramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromNanogramsPerDeciLiter(double nanogramsperdeciliter) => new Density(nanogramsperdeciliter, DensityUnit.NanogramPerDeciliter);
+ public static Density FromNanogramsPerDeciliter(double nanogramsperdeciliter) => new Density(nanogramsperdeciliter, DensityUnit.NanogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromNanogramsPerLiter(double nanogramsperliter) => new Density(nanogramsperliter, DensityUnit.NanogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromNanogramsPerMilliliter(double nanogramspermilliliter) => new Density(nanogramspermilliliter, DensityUnit.NanogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Density FromPicogramsPerDeciLiter(double picogramsperdeciliter) => new Density(picogramsperdeciliter, DensityUnit.PicogramPerDeciliter);
+ public static Density FromPicogramsPerDeciliter(double picogramsperdeciliter) => new Density(picogramsperdeciliter, DensityUnit.PicogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPicogramsPerLiter(double picogramsperliter) => new Density(picogramsperliter, DensityUnit.PicogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPicogramsPerMilliliter(double picogramspermilliliter) => new Density(picogramspermilliliter, DensityUnit.PicogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicCentimeter(double poundspercubiccentimeter) => new Density(poundspercubiccentimeter, DensityUnit.PoundPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicFoot(double poundspercubicfoot) => new Density(poundspercubicfoot, DensityUnit.PoundPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicInch(double poundspercubicinch) => new Density(poundspercubicinch, DensityUnit.PoundPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicMeter(double poundspercubicmeter) => new Density(poundspercubicmeter, DensityUnit.PoundPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicMillimeter(double poundspercubicmillimeter) => new Density(poundspercubicmillimeter, DensityUnit.PoundPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerCubicYard(double poundspercubicyard) => new Density(poundspercubicyard, DensityUnit.PoundPerCubicYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerImperialGallon(double poundsperimperialgallon) => new Density(poundsperimperialgallon, DensityUnit.PoundPerImperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromPoundsPerUSGallon(double poundsperusgallon) => new Density(poundsperusgallon, DensityUnit.PoundPerUSGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromSlugsPerCubicCentimeter(double slugspercubiccentimeter) => new Density(slugspercubiccentimeter, DensityUnit.SlugPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromSlugsPerCubicFoot(double slugspercubicfoot) => new Density(slugspercubicfoot, DensityUnit.SlugPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromSlugsPerCubicInch(double slugspercubicinch) => new Density(slugspercubicinch, DensityUnit.SlugPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromSlugsPerCubicMeter(double slugspercubicmeter) => new Density(slugspercubicmeter, DensityUnit.SlugPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromSlugsPerCubicMillimeter(double slugspercubicmillimeter) => new Density(slugspercubicmillimeter, DensityUnit.SlugPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromTonnesPerCubicCentimeter(double tonnespercubiccentimeter) => new Density(tonnespercubiccentimeter, DensityUnit.TonnePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromTonnesPerCubicFoot(double tonnespercubicfoot) => new Density(tonnespercubicfoot, DensityUnit.TonnePerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromTonnesPerCubicInch(double tonnespercubicinch) => new Density(tonnespercubicinch, DensityUnit.TonnePerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromTonnesPerCubicMeter(double tonnespercubicmeter) => new Density(tonnespercubicmeter, DensityUnit.TonnePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Density FromTonnesPerCubicMillimeter(double tonnespercubicmillimeter) => new Density(tonnespercubicmillimeter, DensityUnit.TonnePerCubicMillimeter);
///
@@ -752,8 +695,8 @@ private double GetValueInBaseUnit()
DensityUnit.FemtogramPerLiter => (_value / 1) * 1e-15d,
DensityUnit.FemtogramPerMilliliter => (_value / 1e-3) * 1e-15d,
DensityUnit.GramPerCubicCentimeter => _value / 1e-3,
- DensityUnit.GramPerCubicFoot => _value * 0.0353146667214886,
- DensityUnit.GramPerCubicInch => _value * 61.0237440947323,
+ DensityUnit.GramPerCubicFoot => _value * 0.001 / 0.028316846592,
+ DensityUnit.GramPerCubicInch => _value * 0.001 / 1.6387064e-5,
DensityUnit.GramPerCubicMeter => _value / 1e3,
DensityUnit.GramPerCubicMillimeter => _value / 1e-6,
DensityUnit.GramPerDeciliter => _value / 1e-1,
@@ -763,9 +706,9 @@ private double GetValueInBaseUnit()
DensityUnit.KilogramPerCubicMeter => (_value / 1e3) * 1e3d,
DensityUnit.KilogramPerCubicMillimeter => (_value / 1e-6) * 1e3d,
DensityUnit.KilogramPerLiter => _value * 1e3,
- DensityUnit.KilopoundPerCubicFoot => (_value / 0.062427961) * 1e3d,
- DensityUnit.KilopoundPerCubicInch => (_value / 3.6127298147753e-5) * 1e3d,
- DensityUnit.KilopoundPerCubicYard => (_value * (0.45359237 / 0.9144 / 0.9144 / 0.9144)) * 1e3d,
+ DensityUnit.KilopoundPerCubicFoot => (_value * 0.45359237 / 0.028316846592) * 1e3d,
+ DensityUnit.KilopoundPerCubicInch => (_value * 0.45359237 / 1.6387064e-5) * 1e3d,
+ DensityUnit.KilopoundPerCubicYard => (_value * 0.45359237 / 0.764554857984) * 1e3d,
DensityUnit.MicrogramPerCubicMeter => (_value / 1e3) * 1e-6d,
DensityUnit.MicrogramPerDeciliter => (_value / 1e-1) * 1e-6d,
DensityUnit.MicrogramPerLiter => (_value / 1) * 1e-6d,
@@ -780,22 +723,22 @@ private double GetValueInBaseUnit()
DensityUnit.PicogramPerDeciliter => (_value / 1e-1) * 1e-12d,
DensityUnit.PicogramPerLiter => (_value / 1) * 1e-12d,
DensityUnit.PicogramPerMilliliter => (_value / 1e-3) * 1e-12d,
- DensityUnit.PoundPerCubicCentimeter => _value / 2.204622621848775e-6,
- DensityUnit.PoundPerCubicFoot => _value / 0.062427961,
- DensityUnit.PoundPerCubicInch => _value / 3.6127298147753e-5,
- DensityUnit.PoundPerCubicMeter => _value / 2.204622621848775,
- DensityUnit.PoundPerCubicMillimeter => _value / 2.204622621848775e-9,
- DensityUnit.PoundPerCubicYard => _value * (0.45359237 / 0.9144 / 0.9144 / 0.9144),
- DensityUnit.PoundPerImperialGallon => _value * 9.9776398e1,
- DensityUnit.PoundPerUSGallon => _value * 1.19826427e2,
- DensityUnit.SlugPerCubicCentimeter => _value * 14593903,
- DensityUnit.SlugPerCubicFoot => _value * 515.378818,
- DensityUnit.SlugPerCubicInch => _value * 890574.60201535,
- DensityUnit.SlugPerCubicMeter => _value * 14.5939,
- DensityUnit.SlugPerCubicMillimeter => _value * 14593903000,
+ DensityUnit.PoundPerCubicCentimeter => _value * 0.45359237e6,
+ DensityUnit.PoundPerCubicFoot => _value * 0.45359237 / 0.028316846592,
+ DensityUnit.PoundPerCubicInch => _value * 0.45359237 / 1.6387064e-5,
+ DensityUnit.PoundPerCubicMeter => _value * 0.45359237,
+ DensityUnit.PoundPerCubicMillimeter => _value * 0.45359237e9,
+ DensityUnit.PoundPerCubicYard => _value * 0.45359237 / 0.764554857984,
+ DensityUnit.PoundPerImperialGallon => _value * 0.45359237 / 0.00454609,
+ DensityUnit.PoundPerUSGallon => _value * 0.45359237 / 0.003785411784,
+ DensityUnit.SlugPerCubicCentimeter => _value * 0.45359237e6 * 9.80665 / 0.3048,
+ DensityUnit.SlugPerCubicFoot => _value * (0.45359237 * 9.80665) / (0.3048 * 0.028316846592),
+ DensityUnit.SlugPerCubicInch => _value * (0.45359237 * 9.80665) / (0.3048 * 1.6387064e-5),
+ DensityUnit.SlugPerCubicMeter => _value * 0.45359237 * 9.80665 / 0.3048,
+ DensityUnit.SlugPerCubicMillimeter => _value * 0.45359237e9 * 9.80665 / 0.3048,
DensityUnit.TonnePerCubicCentimeter => _value / 1e-9,
- DensityUnit.TonnePerCubicFoot => _value * 3.53146667214886e4,
- DensityUnit.TonnePerCubicInch => _value * 6.10237440947323e7,
+ DensityUnit.TonnePerCubicFoot => _value * 1000 / 0.028316846592,
+ DensityUnit.TonnePerCubicInch => _value * 1000 / 1.6387064e-5,
DensityUnit.TonnePerCubicMeter => _value / 0.001,
DensityUnit.TonnePerCubicMillimeter => _value / 1e-12,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -821,8 +764,8 @@ private double GetValueAs(DensityUnit unit)
DensityUnit.FemtogramPerLiter => (baseUnitValue * 1) / 1e-15d,
DensityUnit.FemtogramPerMilliliter => (baseUnitValue * 1e-3) / 1e-15d,
DensityUnit.GramPerCubicCentimeter => baseUnitValue * 1e-3,
- DensityUnit.GramPerCubicFoot => baseUnitValue / 0.0353146667214886,
- DensityUnit.GramPerCubicInch => baseUnitValue / 61.0237440947323,
+ DensityUnit.GramPerCubicFoot => baseUnitValue * 0.028316846592 / 0.001,
+ DensityUnit.GramPerCubicInch => baseUnitValue * 1.6387064e-5 / 0.001,
DensityUnit.GramPerCubicMeter => baseUnitValue * 1e3,
DensityUnit.GramPerCubicMillimeter => baseUnitValue * 1e-6,
DensityUnit.GramPerDeciliter => baseUnitValue * 1e-1,
@@ -832,9 +775,9 @@ private double GetValueAs(DensityUnit unit)
DensityUnit.KilogramPerCubicMeter => (baseUnitValue * 1e3) / 1e3d,
DensityUnit.KilogramPerCubicMillimeter => (baseUnitValue * 1e-6) / 1e3d,
DensityUnit.KilogramPerLiter => baseUnitValue / 1e3,
- DensityUnit.KilopoundPerCubicFoot => (baseUnitValue * 0.062427961) / 1e3d,
- DensityUnit.KilopoundPerCubicInch => (baseUnitValue * 3.6127298147753e-5) / 1e3d,
- DensityUnit.KilopoundPerCubicYard => (baseUnitValue / (0.45359237 / 0.9144 / 0.9144 / 0.9144)) / 1e3d,
+ DensityUnit.KilopoundPerCubicFoot => (baseUnitValue * 0.028316846592 / 0.45359237) / 1e3d,
+ DensityUnit.KilopoundPerCubicInch => (baseUnitValue * 1.6387064e-5 / 0.45359237) / 1e3d,
+ DensityUnit.KilopoundPerCubicYard => (baseUnitValue * 0.764554857984 / 0.45359237) / 1e3d,
DensityUnit.MicrogramPerCubicMeter => (baseUnitValue * 1e3) / 1e-6d,
DensityUnit.MicrogramPerDeciliter => (baseUnitValue * 1e-1) / 1e-6d,
DensityUnit.MicrogramPerLiter => (baseUnitValue * 1) / 1e-6d,
@@ -849,22 +792,22 @@ private double GetValueAs(DensityUnit unit)
DensityUnit.PicogramPerDeciliter => (baseUnitValue * 1e-1) / 1e-12d,
DensityUnit.PicogramPerLiter => (baseUnitValue * 1) / 1e-12d,
DensityUnit.PicogramPerMilliliter => (baseUnitValue * 1e-3) / 1e-12d,
- DensityUnit.PoundPerCubicCentimeter => baseUnitValue * 2.204622621848775e-6,
- DensityUnit.PoundPerCubicFoot => baseUnitValue * 0.062427961,
- DensityUnit.PoundPerCubicInch => baseUnitValue * 3.6127298147753e-5,
- DensityUnit.PoundPerCubicMeter => baseUnitValue * 2.204622621848775,
- DensityUnit.PoundPerCubicMillimeter => baseUnitValue * 2.204622621848775e-9,
- DensityUnit.PoundPerCubicYard => baseUnitValue / (0.45359237 / 0.9144 / 0.9144 / 0.9144),
- DensityUnit.PoundPerImperialGallon => baseUnitValue / 9.9776398e1,
- DensityUnit.PoundPerUSGallon => baseUnitValue / 1.19826427e2,
- DensityUnit.SlugPerCubicCentimeter => baseUnitValue / 14593903,
- DensityUnit.SlugPerCubicFoot => baseUnitValue * 0.00194032033,
- DensityUnit.SlugPerCubicInch => baseUnitValue / 890574.60201535,
- DensityUnit.SlugPerCubicMeter => baseUnitValue / 14.5939,
- DensityUnit.SlugPerCubicMillimeter => baseUnitValue / 14593903000,
+ DensityUnit.PoundPerCubicCentimeter => baseUnitValue / 0.45359237e6,
+ DensityUnit.PoundPerCubicFoot => baseUnitValue * 0.028316846592 / 0.45359237,
+ DensityUnit.PoundPerCubicInch => baseUnitValue * 1.6387064e-5 / 0.45359237,
+ DensityUnit.PoundPerCubicMeter => baseUnitValue / 0.45359237,
+ DensityUnit.PoundPerCubicMillimeter => baseUnitValue / 0.45359237e9,
+ DensityUnit.PoundPerCubicYard => baseUnitValue * 0.764554857984 / 0.45359237,
+ DensityUnit.PoundPerImperialGallon => baseUnitValue * 0.00454609 / 0.45359237,
+ DensityUnit.PoundPerUSGallon => baseUnitValue * 0.003785411784 / 0.45359237,
+ DensityUnit.SlugPerCubicCentimeter => baseUnitValue * 0.3048 / (0.45359237e6 * 9.80665),
+ DensityUnit.SlugPerCubicFoot => baseUnitValue * (0.3048 * 0.028316846592) / (0.45359237 * 9.80665),
+ DensityUnit.SlugPerCubicInch => baseUnitValue * (0.3048 * 1.6387064e-5) / (0.45359237 * 9.80665),
+ DensityUnit.SlugPerCubicMeter => baseUnitValue * 0.3048 / (0.45359237 * 9.80665),
+ DensityUnit.SlugPerCubicMillimeter => baseUnitValue * 0.3048 / (0.45359237e9 * 9.80665),
DensityUnit.TonnePerCubicCentimeter => baseUnitValue * 1e-9,
- DensityUnit.TonnePerCubicFoot => baseUnitValue / 3.53146667214886e4,
- DensityUnit.TonnePerCubicInch => baseUnitValue / 6.10237440947323e7,
+ DensityUnit.TonnePerCubicFoot => baseUnitValue * 0.028316846592 / 1000,
+ DensityUnit.TonnePerCubicInch => baseUnitValue * 1.6387064e-5 / 1000,
DensityUnit.TonnePerCubicMeter => baseUnitValue * 0.001,
DensityUnit.TonnePerCubicMillimeter => baseUnitValue * 1e-12,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/DoseAreaProduct.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/DoseAreaProduct.g.cs
index c5ae21968d..f1d4b881c2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/DoseAreaProduct.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/DoseAreaProduct.g.cs
@@ -54,7 +54,6 @@ public struct DoseAreaProduct
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public DoseAreaProduct(double value, DoseAreaProductUnit unit)
{
_value = value;
@@ -189,121 +188,101 @@ public DoseAreaProduct(double value, DoseAreaProductUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromCentigraySquareCentimeters(double centigraysquarecentimeters) => new DoseAreaProduct(centigraysquarecentimeters, DoseAreaProductUnit.CentigraySquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromCentigraySquareDecimeters(double centigraysquaredecimeters) => new DoseAreaProduct(centigraysquaredecimeters, DoseAreaProductUnit.CentigraySquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromCentigraySquareMeters(double centigraysquaremeters) => new DoseAreaProduct(centigraysquaremeters, DoseAreaProductUnit.CentigraySquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromCentigraySquareMillimeters(double centigraysquaremillimeters) => new DoseAreaProduct(centigraysquaremillimeters, DoseAreaProductUnit.CentigraySquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromDecigraySquareCentimeters(double decigraysquarecentimeters) => new DoseAreaProduct(decigraysquarecentimeters, DoseAreaProductUnit.DecigraySquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromDecigraySquareDecimeters(double decigraysquaredecimeters) => new DoseAreaProduct(decigraysquaredecimeters, DoseAreaProductUnit.DecigraySquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromDecigraySquareMeters(double decigraysquaremeters) => new DoseAreaProduct(decigraysquaremeters, DoseAreaProductUnit.DecigraySquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromDecigraySquareMillimeters(double decigraysquaremillimeters) => new DoseAreaProduct(decigraysquaremillimeters, DoseAreaProductUnit.DecigraySquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromGraySquareCentimeters(double graysquarecentimeters) => new DoseAreaProduct(graysquarecentimeters, DoseAreaProductUnit.GraySquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromGraySquareDecimeters(double graysquaredecimeters) => new DoseAreaProduct(graysquaredecimeters, DoseAreaProductUnit.GraySquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromGraySquareMeters(double graysquaremeters) => new DoseAreaProduct(graysquaremeters, DoseAreaProductUnit.GraySquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromGraySquareMillimeters(double graysquaremillimeters) => new DoseAreaProduct(graysquaremillimeters, DoseAreaProductUnit.GraySquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMicrograySquareCentimeters(double micrograysquarecentimeters) => new DoseAreaProduct(micrograysquarecentimeters, DoseAreaProductUnit.MicrograySquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMicrograySquareDecimeters(double micrograysquaredecimeters) => new DoseAreaProduct(micrograysquaredecimeters, DoseAreaProductUnit.MicrograySquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMicrograySquareMeters(double micrograysquaremeters) => new DoseAreaProduct(micrograysquaremeters, DoseAreaProductUnit.MicrograySquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMicrograySquareMillimeters(double micrograysquaremillimeters) => new DoseAreaProduct(micrograysquaremillimeters, DoseAreaProductUnit.MicrograySquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMilligraySquareCentimeters(double milligraysquarecentimeters) => new DoseAreaProduct(milligraysquarecentimeters, DoseAreaProductUnit.MilligraySquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMilligraySquareDecimeters(double milligraysquaredecimeters) => new DoseAreaProduct(milligraysquaredecimeters, DoseAreaProductUnit.MilligraySquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMilligraySquareMeters(double milligraysquaremeters) => new DoseAreaProduct(milligraysquaremeters, DoseAreaProductUnit.MilligraySquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DoseAreaProduct FromMilligraySquareMillimeters(double milligraysquaremillimeters) => new DoseAreaProduct(milligraysquaremillimeters, DoseAreaProductUnit.MilligraySquareMillimeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Duration.g.cs
index fc0a4734f0..97319ed612 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Duration.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Duration.g.cs
@@ -51,7 +51,6 @@ public struct Duration
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Duration(double value, DurationUnit unit)
{
_value = value;
@@ -146,73 +145,61 @@ public Duration(double value, DurationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromDays(double days) => new Duration(days, DurationUnit.Day);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromHours(double hours) => new Duration(hours, DurationUnit.Hour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromJulianYears(double julianyears) => new Duration(julianyears, DurationUnit.JulianYear);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromMicroseconds(double microseconds) => new Duration(microseconds, DurationUnit.Microsecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromMilliseconds(double milliseconds) => new Duration(milliseconds, DurationUnit.Millisecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromMinutes(double minutes) => new Duration(minutes, DurationUnit.Minute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromMonths30(double months30) => new Duration(months30, DurationUnit.Month30);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromNanoseconds(double nanoseconds) => new Duration(nanoseconds, DurationUnit.Nanosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromSeconds(double seconds) => new Duration(seconds, DurationUnit.Second);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromSols(double sols) => new Duration(sols, DurationUnit.Sol);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromWeeks(double weeks) => new Duration(weeks, DurationUnit.Week);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Duration FromYears365(double years365) => new Duration(years365, DurationUnit.Year365);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/DynamicViscosity.g.cs
index b99e9fc379..fe4a43bac6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/DynamicViscosity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/DynamicViscosity.g.cs
@@ -54,7 +54,6 @@ public struct DynamicViscosity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public DynamicViscosity(double value, DynamicViscosityUnit unit)
{
_value = value;
@@ -139,61 +138,51 @@ public DynamicViscosity(double value, DynamicViscosityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromCentipoise(double centipoise) => new DynamicViscosity(centipoise, DynamicViscosityUnit.Centipoise);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromMicropascalSeconds(double micropascalseconds) => new DynamicViscosity(micropascalseconds, DynamicViscosityUnit.MicropascalSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromMillipascalSeconds(double millipascalseconds) => new DynamicViscosity(millipascalseconds, DynamicViscosityUnit.MillipascalSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromNewtonSecondsPerMeterSquared(double newtonsecondspermetersquared) => new DynamicViscosity(newtonsecondspermetersquared, DynamicViscosityUnit.NewtonSecondPerMeterSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromPascalSeconds(double pascalseconds) => new DynamicViscosity(pascalseconds, DynamicViscosityUnit.PascalSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromPoise(double poise) => new DynamicViscosity(poise, DynamicViscosityUnit.Poise);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromPoundsForceSecondPerSquareFoot(double poundsforcesecondpersquarefoot) => new DynamicViscosity(poundsforcesecondpersquarefoot, DynamicViscosityUnit.PoundForceSecondPerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromPoundsForceSecondPerSquareInch(double poundsforcesecondpersquareinch) => new DynamicViscosity(poundsforcesecondpersquareinch, DynamicViscosityUnit.PoundForceSecondPerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromPoundsPerFootSecond(double poundsperfootsecond) => new DynamicViscosity(poundsperfootsecond, DynamicViscosityUnit.PoundPerFootSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static DynamicViscosity FromReyns(double reyns) => new DynamicViscosity(reyns, DynamicViscosityUnit.Reyn);
///
@@ -242,10 +231,10 @@ private double GetValueInBaseUnit()
DynamicViscosityUnit.NewtonSecondPerMeterSquared => _value,
DynamicViscosityUnit.PascalSecond => _value,
DynamicViscosityUnit.Poise => _value / 10,
- DynamicViscosityUnit.PoundForceSecondPerSquareFoot => _value * 4.7880258980335843e1,
- DynamicViscosityUnit.PoundForceSecondPerSquareInch => _value * 6.8947572931683613e3,
- DynamicViscosityUnit.PoundPerFootSecond => _value * 1.4881639,
- DynamicViscosityUnit.Reyn => _value * 6.8947572931683613e3,
+ DynamicViscosityUnit.PoundForceSecondPerSquareFoot => _value * 4.4482216152605 / 9.290304e-2,
+ DynamicViscosityUnit.PoundForceSecondPerSquareInch => _value * 4.4482216152605 / 0.00064516,
+ DynamicViscosityUnit.PoundPerFootSecond => _value * 0.45359237 / 0.3048,
+ DynamicViscosityUnit.Reyn => _value * 4.4482216152605 / 0.00064516,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -265,10 +254,10 @@ private double GetValueAs(DynamicViscosityUnit unit)
DynamicViscosityUnit.NewtonSecondPerMeterSquared => baseUnitValue,
DynamicViscosityUnit.PascalSecond => baseUnitValue,
DynamicViscosityUnit.Poise => baseUnitValue * 10,
- DynamicViscosityUnit.PoundForceSecondPerSquareFoot => baseUnitValue / 4.7880258980335843e1,
- DynamicViscosityUnit.PoundForceSecondPerSquareInch => baseUnitValue / 6.8947572931683613e3,
- DynamicViscosityUnit.PoundPerFootSecond => baseUnitValue / 1.4881639,
- DynamicViscosityUnit.Reyn => baseUnitValue / 6.8947572931683613e3,
+ DynamicViscosityUnit.PoundForceSecondPerSquareFoot => baseUnitValue * 9.290304e-2 / 4.4482216152605,
+ DynamicViscosityUnit.PoundForceSecondPerSquareInch => baseUnitValue * 0.00064516 / 4.4482216152605,
+ DynamicViscosityUnit.PoundPerFootSecond => baseUnitValue * 0.3048 / 0.45359237,
+ DynamicViscosityUnit.Reyn => baseUnitValue * 0.00064516 / 4.4482216152605,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
index a31ec25e9b..93b1ed8c6d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricAdmittance.g.cs
@@ -55,7 +55,6 @@ public struct ElectricAdmittance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
{
_value = value;
@@ -170,97 +169,81 @@ public ElectricAdmittance(double value, ElectricAdmittanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromGigamhos(double gigamhos) => new ElectricAdmittance(gigamhos, ElectricAdmittanceUnit.Gigamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromGigasiemens(double gigasiemens) => new ElectricAdmittance(gigasiemens, ElectricAdmittanceUnit.Gigasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromKilomhos(double kilomhos) => new ElectricAdmittance(kilomhos, ElectricAdmittanceUnit.Kilomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromKilosiemens(double kilosiemens) => new ElectricAdmittance(kilosiemens, ElectricAdmittanceUnit.Kilosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMegamhos(double megamhos) => new ElectricAdmittance(megamhos, ElectricAdmittanceUnit.Megamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMegasiemens(double megasiemens) => new ElectricAdmittance(megasiemens, ElectricAdmittanceUnit.Megasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMhos(double mhos) => new ElectricAdmittance(mhos, ElectricAdmittanceUnit.Mho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMicromhos(double micromhos) => new ElectricAdmittance(micromhos, ElectricAdmittanceUnit.Micromho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMicrosiemens(double microsiemens) => new ElectricAdmittance(microsiemens, ElectricAdmittanceUnit.Microsiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMillimhos(double millimhos) => new ElectricAdmittance(millimhos, ElectricAdmittanceUnit.Millimho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromMillisiemens(double millisiemens) => new ElectricAdmittance(millisiemens, ElectricAdmittanceUnit.Millisiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromNanomhos(double nanomhos) => new ElectricAdmittance(nanomhos, ElectricAdmittanceUnit.Nanomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromNanosiemens(double nanosiemens) => new ElectricAdmittance(nanosiemens, ElectricAdmittanceUnit.Nanosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromSiemens(double siemens) => new ElectricAdmittance(siemens, ElectricAdmittanceUnit.Siemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromTeramhos(double teramhos) => new ElectricAdmittance(teramhos, ElectricAdmittanceUnit.Teramho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricAdmittance FromTerasiemens(double terasiemens) => new ElectricAdmittance(terasiemens, ElectricAdmittanceUnit.Terasiemens);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
index de5f743907..dda656ec98 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentEnergy.g.cs
@@ -51,7 +51,6 @@ public struct ElectricApparentEnergy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricApparentEnergy(double value, ElectricApparentEnergyUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public ElectricApparentEnergy(double value, ElectricApparentEnergyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentEnergy FromKilovoltampereHours(double kilovoltamperehours) => new ElectricApparentEnergy(kilovoltamperehours, ElectricApparentEnergyUnit.KilovoltampereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentEnergy FromMegavoltampereHours(double megavoltamperehours) => new ElectricApparentEnergy(megavoltamperehours, ElectricApparentEnergyUnit.MegavoltampereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentEnergy FromVoltampereHours(double voltamperehours) => new ElectricApparentEnergy(voltamperehours, ElectricApparentEnergyUnit.VoltampereHour);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
index 157f7091eb..43111343ea 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricApparentPower.g.cs
@@ -54,7 +54,6 @@ public struct ElectricApparentPower
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricApparentPower(double value, ElectricApparentPowerUnit unit)
{
_value = value;
@@ -119,37 +118,31 @@ public ElectricApparentPower(double value, ElectricApparentPowerUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromGigavoltamperes(double gigavoltamperes) => new ElectricApparentPower(gigavoltamperes, ElectricApparentPowerUnit.Gigavoltampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromKilovoltamperes(double kilovoltamperes) => new ElectricApparentPower(kilovoltamperes, ElectricApparentPowerUnit.Kilovoltampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromMegavoltamperes(double megavoltamperes) => new ElectricApparentPower(megavoltamperes, ElectricApparentPowerUnit.Megavoltampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromMicrovoltamperes(double microvoltamperes) => new ElectricApparentPower(microvoltamperes, ElectricApparentPowerUnit.Microvoltampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromMillivoltamperes(double millivoltamperes) => new ElectricApparentPower(millivoltamperes, ElectricApparentPowerUnit.Millivoltampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricApparentPower FromVoltamperes(double voltamperes) => new ElectricApparentPower(voltamperes, ElectricApparentPowerUnit.Voltampere);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
index 267671bcd0..636e11ea34 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCapacitance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricCapacitance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricCapacitance(double value, ElectricCapacitanceUnit unit)
{
_value = value;
@@ -124,43 +123,36 @@ public ElectricCapacitance(double value, ElectricCapacitanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromFarads(double farads) => new ElectricCapacitance(farads, ElectricCapacitanceUnit.Farad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromKilofarads(double kilofarads) => new ElectricCapacitance(kilofarads, ElectricCapacitanceUnit.Kilofarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromMegafarads(double megafarads) => new ElectricCapacitance(megafarads, ElectricCapacitanceUnit.Megafarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromMicrofarads(double microfarads) => new ElectricCapacitance(microfarads, ElectricCapacitanceUnit.Microfarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromMillifarads(double millifarads) => new ElectricCapacitance(millifarads, ElectricCapacitanceUnit.Millifarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromNanofarads(double nanofarads) => new ElectricCapacitance(nanofarads, ElectricCapacitanceUnit.Nanofarad);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCapacitance FromPicofarads(double picofarads) => new ElectricCapacitance(picofarads, ElectricCapacitanceUnit.Picofarad);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCharge.g.cs
index ed2ad7acc8..251d26918f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCharge.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCharge.g.cs
@@ -54,7 +54,6 @@ public struct ElectricCharge
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricCharge(double value, ElectricChargeUnit unit)
{
_value = value;
@@ -144,67 +143,56 @@ public ElectricCharge(double value, ElectricChargeUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromAmpereHours(double amperehours) => new ElectricCharge(amperehours, ElectricChargeUnit.AmpereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromCoulombs(double coulombs) => new ElectricCharge(coulombs, ElectricChargeUnit.Coulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromKiloampereHours(double kiloamperehours) => new ElectricCharge(kiloamperehours, ElectricChargeUnit.KiloampereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromKilocoulombs(double kilocoulombs) => new ElectricCharge(kilocoulombs, ElectricChargeUnit.Kilocoulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromMegaampereHours(double megaamperehours) => new ElectricCharge(megaamperehours, ElectricChargeUnit.MegaampereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromMegacoulombs(double megacoulombs) => new ElectricCharge(megacoulombs, ElectricChargeUnit.Megacoulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromMicrocoulombs(double microcoulombs) => new ElectricCharge(microcoulombs, ElectricChargeUnit.Microcoulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromMilliampereHours(double milliamperehours) => new ElectricCharge(milliamperehours, ElectricChargeUnit.MilliampereHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromMillicoulombs(double millicoulombs) => new ElectricCharge(millicoulombs, ElectricChargeUnit.Millicoulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromNanocoulombs(double nanocoulombs) => new ElectricCharge(nanocoulombs, ElectricChargeUnit.Nanocoulomb);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCharge FromPicocoulombs(double picocoulombs) => new ElectricCharge(picocoulombs, ElectricChargeUnit.Picocoulomb);
///
@@ -247,14 +235,14 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- ElectricChargeUnit.AmpereHour => _value / 2.77777777777e-4,
+ ElectricChargeUnit.AmpereHour => _value * 3600,
ElectricChargeUnit.Coulomb => _value,
- ElectricChargeUnit.KiloampereHour => (_value / 2.77777777777e-4) * 1e3d,
+ ElectricChargeUnit.KiloampereHour => (_value * 3600) * 1e3d,
ElectricChargeUnit.Kilocoulomb => (_value) * 1e3d,
- ElectricChargeUnit.MegaampereHour => (_value / 2.77777777777e-4) * 1e6d,
+ ElectricChargeUnit.MegaampereHour => (_value * 3600) * 1e6d,
ElectricChargeUnit.Megacoulomb => (_value) * 1e6d,
ElectricChargeUnit.Microcoulomb => (_value) * 1e-6d,
- ElectricChargeUnit.MilliampereHour => (_value / 2.77777777777e-4) * 1e-3d,
+ ElectricChargeUnit.MilliampereHour => (_value * 3600) * 1e-3d,
ElectricChargeUnit.Millicoulomb => (_value) * 1e-3d,
ElectricChargeUnit.Nanocoulomb => (_value) * 1e-9d,
ElectricChargeUnit.Picocoulomb => (_value) * 1e-12d,
@@ -271,14 +259,14 @@ private double GetValueAs(ElectricChargeUnit unit)
return unit switch
{
- ElectricChargeUnit.AmpereHour => baseUnitValue * 2.77777777777e-4,
+ ElectricChargeUnit.AmpereHour => baseUnitValue / 3600,
ElectricChargeUnit.Coulomb => baseUnitValue,
- ElectricChargeUnit.KiloampereHour => (baseUnitValue * 2.77777777777e-4) / 1e3d,
+ ElectricChargeUnit.KiloampereHour => (baseUnitValue / 3600) / 1e3d,
ElectricChargeUnit.Kilocoulomb => (baseUnitValue) / 1e3d,
- ElectricChargeUnit.MegaampereHour => (baseUnitValue * 2.77777777777e-4) / 1e6d,
+ ElectricChargeUnit.MegaampereHour => (baseUnitValue / 3600) / 1e6d,
ElectricChargeUnit.Megacoulomb => (baseUnitValue) / 1e6d,
ElectricChargeUnit.Microcoulomb => (baseUnitValue) / 1e-6d,
- ElectricChargeUnit.MilliampereHour => (baseUnitValue * 2.77777777777e-4) / 1e-3d,
+ ElectricChargeUnit.MilliampereHour => (baseUnitValue / 3600) / 1e-3d,
ElectricChargeUnit.Millicoulomb => (baseUnitValue) / 1e-3d,
ElectricChargeUnit.Nanocoulomb => (baseUnitValue) / 1e-9d,
ElectricChargeUnit.Picocoulomb => (baseUnitValue) / 1e-12d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
index da3a553805..138be948a4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricChargeDensity.g.cs
@@ -54,7 +54,6 @@ public struct ElectricChargeDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricChargeDensity(double value, ElectricChargeDensityUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public ElectricChargeDensity(double value, ElectricChargeDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricChargeDensity FromCoulombsPerCubicMeter(double coulombspercubicmeter) => new ElectricChargeDensity(coulombspercubicmeter, ElectricChargeDensityUnit.CoulombPerCubicMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
index 170bb5e888..930aa75ffa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricConductance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricConductance(double value, ElectricConductanceUnit unit)
{
_value = value;
@@ -169,97 +168,81 @@ public ElectricConductance(double value, ElectricConductanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromGigamhos(double gigamhos) => new ElectricConductance(gigamhos, ElectricConductanceUnit.Gigamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromGigasiemens(double gigasiemens) => new ElectricConductance(gigasiemens, ElectricConductanceUnit.Gigasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromKilomhos(double kilomhos) => new ElectricConductance(kilomhos, ElectricConductanceUnit.Kilomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromKilosiemens(double kilosiemens) => new ElectricConductance(kilosiemens, ElectricConductanceUnit.Kilosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMegamhos(double megamhos) => new ElectricConductance(megamhos, ElectricConductanceUnit.Megamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMegasiemens(double megasiemens) => new ElectricConductance(megasiemens, ElectricConductanceUnit.Megasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMhos(double mhos) => new ElectricConductance(mhos, ElectricConductanceUnit.Mho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMicromhos(double micromhos) => new ElectricConductance(micromhos, ElectricConductanceUnit.Micromho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMicrosiemens(double microsiemens) => new ElectricConductance(microsiemens, ElectricConductanceUnit.Microsiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMillimhos(double millimhos) => new ElectricConductance(millimhos, ElectricConductanceUnit.Millimho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromMillisiemens(double millisiemens) => new ElectricConductance(millisiemens, ElectricConductanceUnit.Millisiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromNanomhos(double nanomhos) => new ElectricConductance(nanomhos, ElectricConductanceUnit.Nanomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromNanosiemens(double nanosiemens) => new ElectricConductance(nanosiemens, ElectricConductanceUnit.Nanosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromSiemens(double siemens) => new ElectricConductance(siemens, ElectricConductanceUnit.Siemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromTeramhos(double teramhos) => new ElectricConductance(teramhos, ElectricConductanceUnit.Teramho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductance FromTerasiemens(double terasiemens) => new ElectricConductance(terasiemens, ElectricConductanceUnit.Terasiemens);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductivity.g.cs
index bebc0fa543..746fb25558 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductivity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricConductivity.g.cs
@@ -54,7 +54,6 @@ public struct ElectricConductivity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricConductivity(double value, ElectricConductivityUnit unit)
{
_value = value;
@@ -119,37 +118,31 @@ public ElectricConductivity(double value, ElectricConductivityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromMicrosiemensPerCentimeter(double microsiemenspercentimeter) => new ElectricConductivity(microsiemenspercentimeter, ElectricConductivityUnit.MicrosiemensPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromMillisiemensPerCentimeter(double millisiemenspercentimeter) => new ElectricConductivity(millisiemenspercentimeter, ElectricConductivityUnit.MillisiemensPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromSiemensPerCentimeter(double siemenspercentimeter) => new ElectricConductivity(siemenspercentimeter, ElectricConductivityUnit.SiemensPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromSiemensPerFoot(double siemensperfoot) => new ElectricConductivity(siemensperfoot, ElectricConductivityUnit.SiemensPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromSiemensPerInch(double siemensperinch) => new ElectricConductivity(siemensperinch, ElectricConductivityUnit.SiemensPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricConductivity FromSiemensPerMeter(double siemenspermeter) => new ElectricConductivity(siemenspermeter, ElectricConductivityUnit.SiemensPerMeter);
///
@@ -195,8 +188,8 @@ private double GetValueInBaseUnit()
ElectricConductivityUnit.MicrosiemensPerCentimeter => (_value * 1e2) * 1e-6d,
ElectricConductivityUnit.MillisiemensPerCentimeter => (_value * 1e2) * 1e-3d,
ElectricConductivityUnit.SiemensPerCentimeter => _value * 1e2,
- ElectricConductivityUnit.SiemensPerFoot => _value * 3.2808398950131234,
- ElectricConductivityUnit.SiemensPerInch => _value * 3.937007874015748e1,
+ ElectricConductivityUnit.SiemensPerFoot => _value / 0.3048,
+ ElectricConductivityUnit.SiemensPerInch => _value / 2.54e-2,
ElectricConductivityUnit.SiemensPerMeter => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -214,8 +207,8 @@ private double GetValueAs(ElectricConductivityUnit unit)
ElectricConductivityUnit.MicrosiemensPerCentimeter => (baseUnitValue / 1e2) / 1e-6d,
ElectricConductivityUnit.MillisiemensPerCentimeter => (baseUnitValue / 1e2) / 1e-3d,
ElectricConductivityUnit.SiemensPerCentimeter => baseUnitValue / 1e2,
- ElectricConductivityUnit.SiemensPerFoot => baseUnitValue / 3.2808398950131234,
- ElectricConductivityUnit.SiemensPerInch => baseUnitValue / 3.937007874015748e1,
+ ElectricConductivityUnit.SiemensPerFoot => baseUnitValue * 0.3048,
+ ElectricConductivityUnit.SiemensPerInch => baseUnitValue * 2.54e-2,
ElectricConductivityUnit.SiemensPerMeter => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
index 43c4356bce..36e8378ac9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrent.g.cs
@@ -54,7 +54,6 @@ public struct ElectricCurrent
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricCurrent(double value, ElectricCurrentUnit unit)
{
_value = value;
@@ -134,55 +133,46 @@ public ElectricCurrent(double value, ElectricCurrentUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromAmperes(double amperes) => new ElectricCurrent(amperes, ElectricCurrentUnit.Ampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromCentiamperes(double centiamperes) => new ElectricCurrent(centiamperes, ElectricCurrentUnit.Centiampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromFemtoamperes(double femtoamperes) => new ElectricCurrent(femtoamperes, ElectricCurrentUnit.Femtoampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromKiloamperes(double kiloamperes) => new ElectricCurrent(kiloamperes, ElectricCurrentUnit.Kiloampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromMegaamperes(double megaamperes) => new ElectricCurrent(megaamperes, ElectricCurrentUnit.Megaampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromMicroamperes(double microamperes) => new ElectricCurrent(microamperes, ElectricCurrentUnit.Microampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromMilliamperes(double milliamperes) => new ElectricCurrent(milliamperes, ElectricCurrentUnit.Milliampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromNanoamperes(double nanoamperes) => new ElectricCurrent(nanoamperes, ElectricCurrentUnit.Nanoampere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrent FromPicoamperes(double picoamperes) => new ElectricCurrent(picoamperes, ElectricCurrentUnit.Picoampere);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
index c34a892ae4..865c557c2c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs
@@ -54,7 +54,6 @@ public struct ElectricCurrentDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricCurrentDensity(double value, ElectricCurrentDensityUnit unit)
{
_value = value;
@@ -104,19 +103,16 @@ public ElectricCurrentDensity(double value, ElectricCurrentDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentDensity FromAmperesPerSquareFoot(double amperespersquarefoot) => new ElectricCurrentDensity(amperespersquarefoot, ElectricCurrentDensityUnit.AmperePerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentDensity FromAmperesPerSquareInch(double amperespersquareinch) => new ElectricCurrentDensity(amperespersquareinch, ElectricCurrentDensityUnit.AmperePerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentDensity FromAmperesPerSquareMeter(double amperespersquaremeter) => new ElectricCurrentDensity(amperespersquaremeter, ElectricCurrentDensityUnit.AmperePerSquareMeter);
///
@@ -159,8 +155,8 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- ElectricCurrentDensityUnit.AmperePerSquareFoot => _value * 1.0763910416709722e1,
- ElectricCurrentDensityUnit.AmperePerSquareInch => _value * 1.5500031000062000e3,
+ ElectricCurrentDensityUnit.AmperePerSquareFoot => _value / 9.290304e-2,
+ ElectricCurrentDensityUnit.AmperePerSquareInch => _value / 0.00064516,
ElectricCurrentDensityUnit.AmperePerSquareMeter => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -175,8 +171,8 @@ private double GetValueAs(ElectricCurrentDensityUnit unit)
return unit switch
{
- ElectricCurrentDensityUnit.AmperePerSquareFoot => baseUnitValue / 1.0763910416709722e1,
- ElectricCurrentDensityUnit.AmperePerSquareInch => baseUnitValue / 1.5500031000062000e3,
+ ElectricCurrentDensityUnit.AmperePerSquareFoot => baseUnitValue * 9.290304e-2,
+ ElectricCurrentDensityUnit.AmperePerSquareInch => baseUnitValue * 0.00064516,
ElectricCurrentDensityUnit.AmperePerSquareMeter => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
index 00d0d1575c..f61c5df9f8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs
@@ -51,7 +51,6 @@ public struct ElectricCurrentGradient
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricCurrentGradient(double value, ElectricCurrentGradientUnit unit)
{
_value = value;
@@ -121,43 +120,36 @@ public ElectricCurrentGradient(double value, ElectricCurrentGradientUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromAmperesPerMicrosecond(double amperespermicrosecond) => new ElectricCurrentGradient(amperespermicrosecond, ElectricCurrentGradientUnit.AmperePerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromAmperesPerMillisecond(double amperespermillisecond) => new ElectricCurrentGradient(amperespermillisecond, ElectricCurrentGradientUnit.AmperePerMillisecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromAmperesPerMinute(double amperesperminute) => new ElectricCurrentGradient(amperesperminute, ElectricCurrentGradientUnit.AmperePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromAmperesPerNanosecond(double amperespernanosecond) => new ElectricCurrentGradient(amperespernanosecond, ElectricCurrentGradientUnit.AmperePerNanosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromAmperesPerSecond(double amperespersecond) => new ElectricCurrentGradient(amperespersecond, ElectricCurrentGradientUnit.AmperePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromMilliamperesPerMinute(double milliamperesperminute) => new ElectricCurrentGradient(milliamperesperminute, ElectricCurrentGradientUnit.MilliamperePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricCurrentGradient FromMilliamperesPerSecond(double milliamperespersecond) => new ElectricCurrentGradient(milliamperespersecond, ElectricCurrentGradientUnit.MilliamperePerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricField.g.cs
index 307c5896bc..17c69fc959 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricField.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricField.g.cs
@@ -54,7 +54,6 @@ public struct ElectricField
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricField(double value, ElectricFieldUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public ElectricField(double value, ElectricFieldUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricField FromVoltsPerMeter(double voltspermeter) => new ElectricField(voltspermeter, ElectricFieldUnit.VoltPerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
index f3bc61ef48..9aa504f3fa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricImpedance.g.cs
@@ -55,7 +55,6 @@ public struct ElectricImpedance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricImpedance(double value, ElectricImpedanceUnit unit)
{
_value = value;
@@ -130,49 +129,41 @@ public ElectricImpedance(double value, ElectricImpedanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromGigaohms(double gigaohms) => new ElectricImpedance(gigaohms, ElectricImpedanceUnit.Gigaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromKiloohms(double kiloohms) => new ElectricImpedance(kiloohms, ElectricImpedanceUnit.Kiloohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromMegaohms(double megaohms) => new ElectricImpedance(megaohms, ElectricImpedanceUnit.Megaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromMicroohms(double microohms) => new ElectricImpedance(microohms, ElectricImpedanceUnit.Microohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromMilliohms(double milliohms) => new ElectricImpedance(milliohms, ElectricImpedanceUnit.Milliohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromNanoohms(double nanoohms) => new ElectricImpedance(nanoohms, ElectricImpedanceUnit.Nanoohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromOhms(double ohms) => new ElectricImpedance(ohms, ElectricImpedanceUnit.Ohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricImpedance FromTeraohms(double teraohms) => new ElectricImpedance(teraohms, ElectricImpedanceUnit.Teraohm);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricInductance.g.cs
index fdd383a0e2..b8e91cff00 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricInductance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricInductance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricInductance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricInductance(double value, ElectricInductanceUnit unit)
{
_value = value;
@@ -114,31 +113,26 @@ public ElectricInductance(double value, ElectricInductanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricInductance FromHenries(double henries) => new ElectricInductance(henries, ElectricInductanceUnit.Henry);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricInductance FromMicrohenries(double microhenries) => new ElectricInductance(microhenries, ElectricInductanceUnit.Microhenry);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricInductance FromMillihenries(double millihenries) => new ElectricInductance(millihenries, ElectricInductanceUnit.Millihenry);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricInductance FromNanohenries(double nanohenries) => new ElectricInductance(nanohenries, ElectricInductanceUnit.Nanohenry);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricInductance FromPicohenries(double picohenries) => new ElectricInductance(picohenries, ElectricInductanceUnit.Picohenry);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
index 1ebad966a8..962ad0e7e0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotential.g.cs
@@ -54,7 +54,6 @@ public struct ElectricPotential
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricPotential(double value, ElectricPotentialUnit unit)
{
_value = value;
@@ -119,37 +118,31 @@ public ElectricPotential(double value, ElectricPotentialUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromKilovolts(double kilovolts) => new ElectricPotential(kilovolts, ElectricPotentialUnit.Kilovolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromMegavolts(double megavolts) => new ElectricPotential(megavolts, ElectricPotentialUnit.Megavolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromMicrovolts(double microvolts) => new ElectricPotential(microvolts, ElectricPotentialUnit.Microvolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromMillivolts(double millivolts) => new ElectricPotential(millivolts, ElectricPotentialUnit.Millivolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromNanovolts(double nanovolts) => new ElectricPotential(nanovolts, ElectricPotentialUnit.Nanovolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricPotential FromVolts(double volts) => new ElectricPotential(volts, ElectricPotentialUnit.Volt);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
deleted file mode 100644
index 2591d57695..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialAc.g.cs
+++ /dev/null
@@ -1,215 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// The Electric Potential of a system known to use Alternating Current.
- ///
- ///
- /// ElectricPotentialAc has been merged into ElectricPotential , and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
- ///
- [Obsolete("ElectricPotentialAc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
- public struct ElectricPotentialAc
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ElectricPotentialAcUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ElectricPotentialAcUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ElectricPotentialAc(double value, ElectricPotentialAcUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ElectricPotentialAc, which is Second. All conversions go via this value.
- ///
- public static ElectricPotentialAcUnit BaseUnit { get; } = ElectricPotentialAcUnit.VoltAc;
-
- ///
- /// Represents the largest possible value of ElectricPotentialAc.
- ///
- public static ElectricPotentialAc MaxValue { get; } = new ElectricPotentialAc(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ElectricPotentialAc.
- ///
- public static ElectricPotentialAc MinValue { get; } = new ElectricPotentialAc(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ElectricPotentialAc Zero { get; } = new ElectricPotentialAc(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double KilovoltsAc => As(ElectricPotentialAcUnit.KilovoltAc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MegavoltsAc => As(ElectricPotentialAcUnit.MegavoltAc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MicrovoltsAc => As(ElectricPotentialAcUnit.MicrovoltAc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MillivoltsAc => As(ElectricPotentialAcUnit.MillivoltAc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double VoltsAc => As(ElectricPotentialAcUnit.VoltAc);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialAc FromKilovoltsAc(double kilovoltsac) => new ElectricPotentialAc(kilovoltsac, ElectricPotentialAcUnit.KilovoltAc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialAc FromMegavoltsAc(double megavoltsac) => new ElectricPotentialAc(megavoltsac, ElectricPotentialAcUnit.MegavoltAc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialAc FromMicrovoltsAc(double microvoltsac) => new ElectricPotentialAc(microvoltsac, ElectricPotentialAcUnit.MicrovoltAc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialAc FromMillivoltsAc(double millivoltsac) => new ElectricPotentialAc(millivoltsac, ElectricPotentialAcUnit.MillivoltAc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialAc FromVoltsAc(double voltsac) => new ElectricPotentialAc(voltsac, ElectricPotentialAcUnit.VoltAc);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ElectricPotentialAc unit value.
- public static ElectricPotentialAc From(double value, ElectricPotentialAcUnit fromUnit)
- {
- return new ElectricPotentialAc(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ElectricPotentialAcUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ElectricPotentialAc to another ElectricPotentialAc with the unit representation .
- ///
- /// A ElectricPotentialAc with the specified unit.
- public ElectricPotentialAc ToUnit(ElectricPotentialAcUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ElectricPotentialAc(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ElectricPotentialAcUnit.KilovoltAc => (_value) * 1e3d,
- ElectricPotentialAcUnit.MegavoltAc => (_value) * 1e6d,
- ElectricPotentialAcUnit.MicrovoltAc => (_value) * 1e-6d,
- ElectricPotentialAcUnit.MillivoltAc => (_value) * 1e-3d,
- ElectricPotentialAcUnit.VoltAc => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ElectricPotentialAcUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ElectricPotentialAcUnit.KilovoltAc => (baseUnitValue) / 1e3d,
- ElectricPotentialAcUnit.MegavoltAc => (baseUnitValue) / 1e6d,
- ElectricPotentialAcUnit.MicrovoltAc => (baseUnitValue) / 1e-6d,
- ElectricPotentialAcUnit.MillivoltAc => (baseUnitValue) / 1e-3d,
- ElectricPotentialAcUnit.VoltAc => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
index 8271f158bf..7743fc469b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs
@@ -51,7 +51,6 @@ public struct ElectricPotentialChangeRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricPotentialChangeRate(double value, ElectricPotentialChangeRateUnit unit)
{
_value = value;
@@ -82,102 +81,102 @@ public ElectricPotentialChangeRate(double value, ElectricPotentialChangeRateUnit
///
/// Gets a value of this quantity converted into
///
- public double KilovoltsPerHours => As(ElectricPotentialChangeRateUnit.KilovoltPerHour);
+ public double KilovoltsPerHour => As(ElectricPotentialChangeRateUnit.KilovoltPerHour);
///
/// Gets a value of this quantity converted into
///
- public double KilovoltsPerMicroseconds => As(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond);
+ public double KilovoltsPerMicrosecond => As(ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond);
///
/// Gets a value of this quantity converted into
///
- public double KilovoltsPerMinutes => As(ElectricPotentialChangeRateUnit.KilovoltPerMinute);
+ public double KilovoltsPerMinute => As(ElectricPotentialChangeRateUnit.KilovoltPerMinute);
///
/// Gets a value of this quantity converted into
///
- public double KilovoltsPerSeconds => As(ElectricPotentialChangeRateUnit.KilovoltPerSecond);
+ public double KilovoltsPerSecond => As(ElectricPotentialChangeRateUnit.KilovoltPerSecond);
///
/// Gets a value of this quantity converted into
///
- public double MegavoltsPerHours => As(ElectricPotentialChangeRateUnit.MegavoltPerHour);
+ public double MegavoltsPerHour => As(ElectricPotentialChangeRateUnit.MegavoltPerHour);
///
/// Gets a value of this quantity converted into
///
- public double MegavoltsPerMicroseconds => As(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond);
+ public double MegavoltsPerMicrosecond => As(ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond);
///
/// Gets a value of this quantity converted into
///
- public double MegavoltsPerMinutes => As(ElectricPotentialChangeRateUnit.MegavoltPerMinute);
+ public double MegavoltsPerMinute => As(ElectricPotentialChangeRateUnit.MegavoltPerMinute);
///
/// Gets a value of this quantity converted into
///
- public double MegavoltsPerSeconds => As(ElectricPotentialChangeRateUnit.MegavoltPerSecond);
+ public double MegavoltsPerSecond => As(ElectricPotentialChangeRateUnit.MegavoltPerSecond);
///
/// Gets a value of this quantity converted into
///
- public double MicrovoltsPerHours => As(ElectricPotentialChangeRateUnit.MicrovoltPerHour);
+ public double MicrovoltsPerHour => As(ElectricPotentialChangeRateUnit.MicrovoltPerHour);
///
/// Gets a value of this quantity converted into
///
- public double MicrovoltsPerMicroseconds => As(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond);
+ public double MicrovoltsPerMicrosecond => As(ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond);
///
/// Gets a value of this quantity converted into
///
- public double MicrovoltsPerMinutes => As(ElectricPotentialChangeRateUnit.MicrovoltPerMinute);
+ public double MicrovoltsPerMinute => As(ElectricPotentialChangeRateUnit.MicrovoltPerMinute);
///
/// Gets a value of this quantity converted into
///
- public double MicrovoltsPerSeconds => As(ElectricPotentialChangeRateUnit.MicrovoltPerSecond);
+ public double MicrovoltsPerSecond => As(ElectricPotentialChangeRateUnit.MicrovoltPerSecond);
///
/// Gets a value of this quantity converted into
///
- public double MillivoltsPerHours => As(ElectricPotentialChangeRateUnit.MillivoltPerHour);
+ public double MillivoltsPerHour => As(ElectricPotentialChangeRateUnit.MillivoltPerHour);
///
/// Gets a value of this quantity converted into
///
- public double MillivoltsPerMicroseconds => As(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond);
+ public double MillivoltsPerMicrosecond => As(ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond);
///
/// Gets a value of this quantity converted into
///
- public double MillivoltsPerMinutes => As(ElectricPotentialChangeRateUnit.MillivoltPerMinute);
+ public double MillivoltsPerMinute => As(ElectricPotentialChangeRateUnit.MillivoltPerMinute);
///
/// Gets a value of this quantity converted into
///
- public double MillivoltsPerSeconds => As(ElectricPotentialChangeRateUnit.MillivoltPerSecond);
+ public double MillivoltsPerSecond => As(ElectricPotentialChangeRateUnit.MillivoltPerSecond);
///
/// Gets a value of this quantity converted into
///
- public double VoltsPerHours => As(ElectricPotentialChangeRateUnit.VoltPerHour);
+ public double VoltsPerHour => As(ElectricPotentialChangeRateUnit.VoltPerHour);
///
/// Gets a value of this quantity converted into
///
- public double VoltsPerMicroseconds => As(ElectricPotentialChangeRateUnit.VoltPerMicrosecond);
+ public double VoltsPerMicrosecond => As(ElectricPotentialChangeRateUnit.VoltPerMicrosecond);
///
/// Gets a value of this quantity converted into
///
- public double VoltsPerMinutes => As(ElectricPotentialChangeRateUnit.VoltPerMinute);
+ public double VoltsPerMinute => As(ElectricPotentialChangeRateUnit.VoltPerMinute);
///
/// Gets a value of this quantity converted into
///
- public double VoltsPerSeconds => As(ElectricPotentialChangeRateUnit.VoltPerSecond);
+ public double VoltsPerSecond => As(ElectricPotentialChangeRateUnit.VoltPerSecond);
#endregion
@@ -186,122 +185,102 @@ public ElectricPotentialChangeRate(double value, ElectricPotentialChangeRateUnit
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromKilovoltsPerHours(double kilovoltsperhours) => new ElectricPotentialChangeRate(kilovoltsperhours, ElectricPotentialChangeRateUnit.KilovoltPerHour);
+ public static ElectricPotentialChangeRate FromKilovoltsPerHour(double kilovoltsperhour) => new ElectricPotentialChangeRate(kilovoltsperhour, ElectricPotentialChangeRateUnit.KilovoltPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromKilovoltsPerMicroseconds(double kilovoltspermicroseconds) => new ElectricPotentialChangeRate(kilovoltspermicroseconds, ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond);
+ public static ElectricPotentialChangeRate FromKilovoltsPerMicrosecond(double kilovoltspermicrosecond) => new ElectricPotentialChangeRate(kilovoltspermicrosecond, ElectricPotentialChangeRateUnit.KilovoltPerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromKilovoltsPerMinutes(double kilovoltsperminutes) => new ElectricPotentialChangeRate(kilovoltsperminutes, ElectricPotentialChangeRateUnit.KilovoltPerMinute);
+ public static ElectricPotentialChangeRate FromKilovoltsPerMinute(double kilovoltsperminute) => new ElectricPotentialChangeRate(kilovoltsperminute, ElectricPotentialChangeRateUnit.KilovoltPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromKilovoltsPerSeconds(double kilovoltsperseconds) => new ElectricPotentialChangeRate(kilovoltsperseconds, ElectricPotentialChangeRateUnit.KilovoltPerSecond);
+ public static ElectricPotentialChangeRate FromKilovoltsPerSecond(double kilovoltspersecond) => new ElectricPotentialChangeRate(kilovoltspersecond, ElectricPotentialChangeRateUnit.KilovoltPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMegavoltsPerHours(double megavoltsperhours) => new ElectricPotentialChangeRate(megavoltsperhours, ElectricPotentialChangeRateUnit.MegavoltPerHour);
+ public static ElectricPotentialChangeRate FromMegavoltsPerHour(double megavoltsperhour) => new ElectricPotentialChangeRate(megavoltsperhour, ElectricPotentialChangeRateUnit.MegavoltPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMegavoltsPerMicroseconds(double megavoltspermicroseconds) => new ElectricPotentialChangeRate(megavoltspermicroseconds, ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond);
+ public static ElectricPotentialChangeRate FromMegavoltsPerMicrosecond(double megavoltspermicrosecond) => new ElectricPotentialChangeRate(megavoltspermicrosecond, ElectricPotentialChangeRateUnit.MegavoltPerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMegavoltsPerMinutes(double megavoltsperminutes) => new ElectricPotentialChangeRate(megavoltsperminutes, ElectricPotentialChangeRateUnit.MegavoltPerMinute);
+ public static ElectricPotentialChangeRate FromMegavoltsPerMinute(double megavoltsperminute) => new ElectricPotentialChangeRate(megavoltsperminute, ElectricPotentialChangeRateUnit.MegavoltPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMegavoltsPerSeconds(double megavoltsperseconds) => new ElectricPotentialChangeRate(megavoltsperseconds, ElectricPotentialChangeRateUnit.MegavoltPerSecond);
+ public static ElectricPotentialChangeRate FromMegavoltsPerSecond(double megavoltspersecond) => new ElectricPotentialChangeRate(megavoltspersecond, ElectricPotentialChangeRateUnit.MegavoltPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMicrovoltsPerHours(double microvoltsperhours) => new ElectricPotentialChangeRate(microvoltsperhours, ElectricPotentialChangeRateUnit.MicrovoltPerHour);
+ public static ElectricPotentialChangeRate FromMicrovoltsPerHour(double microvoltsperhour) => new ElectricPotentialChangeRate(microvoltsperhour, ElectricPotentialChangeRateUnit.MicrovoltPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMicrovoltsPerMicroseconds(double microvoltspermicroseconds) => new ElectricPotentialChangeRate(microvoltspermicroseconds, ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond);
+ public static ElectricPotentialChangeRate FromMicrovoltsPerMicrosecond(double microvoltspermicrosecond) => new ElectricPotentialChangeRate(microvoltspermicrosecond, ElectricPotentialChangeRateUnit.MicrovoltPerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMicrovoltsPerMinutes(double microvoltsperminutes) => new ElectricPotentialChangeRate(microvoltsperminutes, ElectricPotentialChangeRateUnit.MicrovoltPerMinute);
+ public static ElectricPotentialChangeRate FromMicrovoltsPerMinute(double microvoltsperminute) => new ElectricPotentialChangeRate(microvoltsperminute, ElectricPotentialChangeRateUnit.MicrovoltPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMicrovoltsPerSeconds(double microvoltsperseconds) => new ElectricPotentialChangeRate(microvoltsperseconds, ElectricPotentialChangeRateUnit.MicrovoltPerSecond);
+ public static ElectricPotentialChangeRate FromMicrovoltsPerSecond(double microvoltspersecond) => new ElectricPotentialChangeRate(microvoltspersecond, ElectricPotentialChangeRateUnit.MicrovoltPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMillivoltsPerHours(double millivoltsperhours) => new ElectricPotentialChangeRate(millivoltsperhours, ElectricPotentialChangeRateUnit.MillivoltPerHour);
+ public static ElectricPotentialChangeRate FromMillivoltsPerHour(double millivoltsperhour) => new ElectricPotentialChangeRate(millivoltsperhour, ElectricPotentialChangeRateUnit.MillivoltPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMillivoltsPerMicroseconds(double millivoltspermicroseconds) => new ElectricPotentialChangeRate(millivoltspermicroseconds, ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond);
+ public static ElectricPotentialChangeRate FromMillivoltsPerMicrosecond(double millivoltspermicrosecond) => new ElectricPotentialChangeRate(millivoltspermicrosecond, ElectricPotentialChangeRateUnit.MillivoltPerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMillivoltsPerMinutes(double millivoltsperminutes) => new ElectricPotentialChangeRate(millivoltsperminutes, ElectricPotentialChangeRateUnit.MillivoltPerMinute);
+ public static ElectricPotentialChangeRate FromMillivoltsPerMinute(double millivoltsperminute) => new ElectricPotentialChangeRate(millivoltsperminute, ElectricPotentialChangeRateUnit.MillivoltPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromMillivoltsPerSeconds(double millivoltsperseconds) => new ElectricPotentialChangeRate(millivoltsperseconds, ElectricPotentialChangeRateUnit.MillivoltPerSecond);
+ public static ElectricPotentialChangeRate FromMillivoltsPerSecond(double millivoltspersecond) => new ElectricPotentialChangeRate(millivoltspersecond, ElectricPotentialChangeRateUnit.MillivoltPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromVoltsPerHours(double voltsperhours) => new ElectricPotentialChangeRate(voltsperhours, ElectricPotentialChangeRateUnit.VoltPerHour);
+ public static ElectricPotentialChangeRate FromVoltsPerHour(double voltsperhour) => new ElectricPotentialChangeRate(voltsperhour, ElectricPotentialChangeRateUnit.VoltPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromVoltsPerMicroseconds(double voltspermicroseconds) => new ElectricPotentialChangeRate(voltspermicroseconds, ElectricPotentialChangeRateUnit.VoltPerMicrosecond);
+ public static ElectricPotentialChangeRate FromVoltsPerMicrosecond(double voltspermicrosecond) => new ElectricPotentialChangeRate(voltspermicrosecond, ElectricPotentialChangeRateUnit.VoltPerMicrosecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromVoltsPerMinutes(double voltsperminutes) => new ElectricPotentialChangeRate(voltsperminutes, ElectricPotentialChangeRateUnit.VoltPerMinute);
+ public static ElectricPotentialChangeRate FromVoltsPerMinute(double voltsperminute) => new ElectricPotentialChangeRate(voltsperminute, ElectricPotentialChangeRateUnit.VoltPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static ElectricPotentialChangeRate FromVoltsPerSeconds(double voltsperseconds) => new ElectricPotentialChangeRate(voltsperseconds, ElectricPotentialChangeRateUnit.VoltPerSecond);
+ public static ElectricPotentialChangeRate FromVoltsPerSecond(double voltspersecond) => new ElectricPotentialChangeRate(voltspersecond, ElectricPotentialChangeRateUnit.VoltPerSecond);
///
/// Dynamically convert from value and unit enum to .
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
deleted file mode 100644
index 5328ef7ab0..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricPotentialDc.g.cs
+++ /dev/null
@@ -1,215 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// The Electric Potential of a system known to use Direct Current.
- ///
- ///
- /// ElectricPotentialDc has been merged into ElectricPotential , and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.
- ///
- [Obsolete("ElectricPotentialDc has been merged into ElectricPotential, and will be removed in a later major version. If you want to map more parameters into the ElectricPotential class (volts RMS, phase angle, etc.), create your own wrapper type such as a record or named tuple.")]
- public struct ElectricPotentialDc
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ElectricPotentialDcUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ElectricPotentialDcUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ElectricPotentialDc(double value, ElectricPotentialDcUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ElectricPotentialDc, which is Second. All conversions go via this value.
- ///
- public static ElectricPotentialDcUnit BaseUnit { get; } = ElectricPotentialDcUnit.VoltDc;
-
- ///
- /// Represents the largest possible value of ElectricPotentialDc.
- ///
- public static ElectricPotentialDc MaxValue { get; } = new ElectricPotentialDc(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ElectricPotentialDc.
- ///
- public static ElectricPotentialDc MinValue { get; } = new ElectricPotentialDc(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ElectricPotentialDc Zero { get; } = new ElectricPotentialDc(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double KilovoltsDc => As(ElectricPotentialDcUnit.KilovoltDc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MegavoltsDc => As(ElectricPotentialDcUnit.MegavoltDc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MicrovoltsDc => As(ElectricPotentialDcUnit.MicrovoltDc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MillivoltsDc => As(ElectricPotentialDcUnit.MillivoltDc);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double VoltsDc => As(ElectricPotentialDcUnit.VoltDc);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialDc FromKilovoltsDc(double kilovoltsdc) => new ElectricPotentialDc(kilovoltsdc, ElectricPotentialDcUnit.KilovoltDc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialDc FromMegavoltsDc(double megavoltsdc) => new ElectricPotentialDc(megavoltsdc, ElectricPotentialDcUnit.MegavoltDc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialDc FromMicrovoltsDc(double microvoltsdc) => new ElectricPotentialDc(microvoltsdc, ElectricPotentialDcUnit.MicrovoltDc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialDc FromMillivoltsDc(double millivoltsdc) => new ElectricPotentialDc(millivoltsdc, ElectricPotentialDcUnit.MillivoltDc);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ElectricPotentialDc FromVoltsDc(double voltsdc) => new ElectricPotentialDc(voltsdc, ElectricPotentialDcUnit.VoltDc);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ElectricPotentialDc unit value.
- public static ElectricPotentialDc From(double value, ElectricPotentialDcUnit fromUnit)
- {
- return new ElectricPotentialDc(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ElectricPotentialDcUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ElectricPotentialDc to another ElectricPotentialDc with the unit representation .
- ///
- /// A ElectricPotentialDc with the specified unit.
- public ElectricPotentialDc ToUnit(ElectricPotentialDcUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ElectricPotentialDc(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ElectricPotentialDcUnit.KilovoltDc => (_value) * 1e3d,
- ElectricPotentialDcUnit.MegavoltDc => (_value) * 1e6d,
- ElectricPotentialDcUnit.MicrovoltDc => (_value) * 1e-6d,
- ElectricPotentialDcUnit.MillivoltDc => (_value) * 1e-3d,
- ElectricPotentialDcUnit.VoltDc => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ElectricPotentialDcUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ElectricPotentialDcUnit.KilovoltDc => (baseUnitValue) / 1e3d,
- ElectricPotentialDcUnit.MegavoltDc => (baseUnitValue) / 1e6d,
- ElectricPotentialDcUnit.MicrovoltDc => (baseUnitValue) / 1e-6d,
- ElectricPotentialDcUnit.MillivoltDc => (baseUnitValue) / 1e-3d,
- ElectricPotentialDcUnit.VoltDc => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
index e68da14a46..0b3394d6fc 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricReactance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricReactance(double value, ElectricReactanceUnit unit)
{
_value = value;
@@ -129,49 +128,41 @@ public ElectricReactance(double value, ElectricReactanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromGigaohms(double gigaohms) => new ElectricReactance(gigaohms, ElectricReactanceUnit.Gigaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromKiloohms(double kiloohms) => new ElectricReactance(kiloohms, ElectricReactanceUnit.Kiloohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromMegaohms(double megaohms) => new ElectricReactance(megaohms, ElectricReactanceUnit.Megaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromMicroohms(double microohms) => new ElectricReactance(microohms, ElectricReactanceUnit.Microohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromMilliohms(double milliohms) => new ElectricReactance(milliohms, ElectricReactanceUnit.Milliohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromNanoohms(double nanoohms) => new ElectricReactance(nanoohms, ElectricReactanceUnit.Nanoohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromOhms(double ohms) => new ElectricReactance(ohms, ElectricReactanceUnit.Ohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactance FromTeraohms(double teraohms) => new ElectricReactance(teraohms, ElectricReactanceUnit.Teraohm);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
index c4b2217c00..b9f634d877 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactiveEnergy.g.cs
@@ -51,7 +51,6 @@ public struct ElectricReactiveEnergy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricReactiveEnergy(double value, ElectricReactiveEnergyUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public ElectricReactiveEnergy(double value, ElectricReactiveEnergyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactiveEnergy FromKilovoltampereReactiveHours(double kilovoltamperereactivehours) => new ElectricReactiveEnergy(kilovoltamperereactivehours, ElectricReactiveEnergyUnit.KilovoltampereReactiveHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactiveEnergy FromMegavoltampereReactiveHours(double megavoltamperereactivehours) => new ElectricReactiveEnergy(megavoltamperereactivehours, ElectricReactiveEnergyUnit.MegavoltampereReactiveHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactiveEnergy FromVoltampereReactiveHours(double voltamperereactivehours) => new ElectricReactiveEnergy(voltamperereactivehours, ElectricReactiveEnergyUnit.VoltampereReactiveHour);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
index ebf8edb732..ea8a4ebba9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricReactivePower.g.cs
@@ -54,7 +54,6 @@ public struct ElectricReactivePower
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricReactivePower(double value, ElectricReactivePowerUnit unit)
{
_value = value;
@@ -109,25 +108,21 @@ public ElectricReactivePower(double value, ElectricReactivePowerUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactivePower FromGigavoltamperesReactive(double gigavoltamperesreactive) => new ElectricReactivePower(gigavoltamperesreactive, ElectricReactivePowerUnit.GigavoltampereReactive);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactivePower FromKilovoltamperesReactive(double kilovoltamperesreactive) => new ElectricReactivePower(kilovoltamperesreactive, ElectricReactivePowerUnit.KilovoltampereReactive);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactivePower FromMegavoltamperesReactive(double megavoltamperesreactive) => new ElectricReactivePower(megavoltamperesreactive, ElectricReactivePowerUnit.MegavoltampereReactive);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricReactivePower FromVoltamperesReactive(double voltamperesreactive) => new ElectricReactivePower(voltamperesreactive, ElectricReactivePowerUnit.VoltampereReactive);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
index 36b793e6e3..1a4badddc5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricResistance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricResistance(double value, ElectricResistanceUnit unit)
{
_value = value;
@@ -129,49 +128,41 @@ public ElectricResistance(double value, ElectricResistanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromGigaohms(double gigaohms) => new ElectricResistance(gigaohms, ElectricResistanceUnit.Gigaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromKiloohms(double kiloohms) => new ElectricResistance(kiloohms, ElectricResistanceUnit.Kiloohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromMegaohms(double megaohms) => new ElectricResistance(megaohms, ElectricResistanceUnit.Megaohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromMicroohms(double microohms) => new ElectricResistance(microohms, ElectricResistanceUnit.Microohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromMilliohms(double milliohms) => new ElectricResistance(milliohms, ElectricResistanceUnit.Milliohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromNanoohms(double nanoohms) => new ElectricResistance(nanoohms, ElectricResistanceUnit.Nanoohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromOhms(double ohms) => new ElectricResistance(ohms, ElectricResistanceUnit.Ohm);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistance FromTeraohms(double teraohms) => new ElectricResistance(teraohms, ElectricResistanceUnit.Teraohm);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistivity.g.cs
index 954ba78ea5..628356a5d3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistivity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricResistivity.g.cs
@@ -54,7 +54,6 @@ public struct ElectricResistivity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricResistivity(double value, ElectricResistivityUnit unit)
{
_value = value;
@@ -159,85 +158,71 @@ public ElectricResistivity(double value, ElectricResistivityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromKiloohmsCentimeter(double kiloohmscentimeter) => new ElectricResistivity(kiloohmscentimeter, ElectricResistivityUnit.KiloohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromKiloohmMeters(double kiloohmmeters) => new ElectricResistivity(kiloohmmeters, ElectricResistivityUnit.KiloohmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMegaohmsCentimeter(double megaohmscentimeter) => new ElectricResistivity(megaohmscentimeter, ElectricResistivityUnit.MegaohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMegaohmMeters(double megaohmmeters) => new ElectricResistivity(megaohmmeters, ElectricResistivityUnit.MegaohmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMicroohmsCentimeter(double microohmscentimeter) => new ElectricResistivity(microohmscentimeter, ElectricResistivityUnit.MicroohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMicroohmMeters(double microohmmeters) => new ElectricResistivity(microohmmeters, ElectricResistivityUnit.MicroohmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMilliohmsCentimeter(double milliohmscentimeter) => new ElectricResistivity(milliohmscentimeter, ElectricResistivityUnit.MilliohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromMilliohmMeters(double milliohmmeters) => new ElectricResistivity(milliohmmeters, ElectricResistivityUnit.MilliohmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromNanoohmsCentimeter(double nanoohmscentimeter) => new ElectricResistivity(nanoohmscentimeter, ElectricResistivityUnit.NanoohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromNanoohmMeters(double nanoohmmeters) => new ElectricResistivity(nanoohmmeters, ElectricResistivityUnit.NanoohmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromOhmsCentimeter(double ohmscentimeter) => new ElectricResistivity(ohmscentimeter, ElectricResistivityUnit.OhmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromOhmMeters(double ohmmeters) => new ElectricResistivity(ohmmeters, ElectricResistivityUnit.OhmMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromPicoohmsCentimeter(double picoohmscentimeter) => new ElectricResistivity(picoohmscentimeter, ElectricResistivityUnit.PicoohmCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricResistivity FromPicoohmMeters(double picoohmmeters) => new ElectricResistivity(picoohmmeters, ElectricResistivityUnit.PicoohmMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
index 411cb1761f..65b51749bc 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs
@@ -54,7 +54,6 @@ public struct ElectricSurfaceChargeDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricSurfaceChargeDensity(double value, ElectricSurfaceChargeDensityUnit unit)
{
_value = value;
@@ -104,19 +103,16 @@ public ElectricSurfaceChargeDensity(double value, ElectricSurfaceChargeDensityUn
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSurfaceChargeDensity FromCoulombsPerSquareCentimeter(double coulombspersquarecentimeter) => new ElectricSurfaceChargeDensity(coulombspersquarecentimeter, ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSurfaceChargeDensity FromCoulombsPerSquareInch(double coulombspersquareinch) => new ElectricSurfaceChargeDensity(coulombspersquareinch, ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSurfaceChargeDensity FromCoulombsPerSquareMeter(double coulombspersquaremeter) => new ElectricSurfaceChargeDensity(coulombspersquaremeter, ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter);
///
@@ -160,7 +156,7 @@ private double GetValueInBaseUnit()
return Unit switch
{
ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter => _value * 1.0e4,
- ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch => _value * 1.5500031000062000e3,
+ ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch => _value / 0.00064516,
ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -176,7 +172,7 @@ private double GetValueAs(ElectricSurfaceChargeDensityUnit unit)
return unit switch
{
ElectricSurfaceChargeDensityUnit.CoulombPerSquareCentimeter => baseUnitValue / 1.0e4,
- ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch => baseUnitValue / 1.5500031000062000e3,
+ ElectricSurfaceChargeDensityUnit.CoulombPerSquareInch => baseUnitValue * 0.00064516,
ElectricSurfaceChargeDensityUnit.CoulombPerSquareMeter => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
index cd2af42a41..f891f370ed 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ElectricSusceptance.g.cs
@@ -54,7 +54,6 @@ public struct ElectricSusceptance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ElectricSusceptance(double value, ElectricSusceptanceUnit unit)
{
_value = value;
@@ -169,97 +168,81 @@ public ElectricSusceptance(double value, ElectricSusceptanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromGigamhos(double gigamhos) => new ElectricSusceptance(gigamhos, ElectricSusceptanceUnit.Gigamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromGigasiemens(double gigasiemens) => new ElectricSusceptance(gigasiemens, ElectricSusceptanceUnit.Gigasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromKilomhos(double kilomhos) => new ElectricSusceptance(kilomhos, ElectricSusceptanceUnit.Kilomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromKilosiemens(double kilosiemens) => new ElectricSusceptance(kilosiemens, ElectricSusceptanceUnit.Kilosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMegamhos(double megamhos) => new ElectricSusceptance(megamhos, ElectricSusceptanceUnit.Megamho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMegasiemens(double megasiemens) => new ElectricSusceptance(megasiemens, ElectricSusceptanceUnit.Megasiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMhos(double mhos) => new ElectricSusceptance(mhos, ElectricSusceptanceUnit.Mho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMicromhos(double micromhos) => new ElectricSusceptance(micromhos, ElectricSusceptanceUnit.Micromho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMicrosiemens(double microsiemens) => new ElectricSusceptance(microsiemens, ElectricSusceptanceUnit.Microsiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMillimhos(double millimhos) => new ElectricSusceptance(millimhos, ElectricSusceptanceUnit.Millimho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromMillisiemens(double millisiemens) => new ElectricSusceptance(millisiemens, ElectricSusceptanceUnit.Millisiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromNanomhos(double nanomhos) => new ElectricSusceptance(nanomhos, ElectricSusceptanceUnit.Nanomho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromNanosiemens(double nanosiemens) => new ElectricSusceptance(nanosiemens, ElectricSusceptanceUnit.Nanosiemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromSiemens(double siemens) => new ElectricSusceptance(siemens, ElectricSusceptanceUnit.Siemens);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromTeramhos(double teramhos) => new ElectricSusceptance(teramhos, ElectricSusceptanceUnit.Teramho);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ElectricSusceptance FromTerasiemens(double terasiemens) => new ElectricSusceptance(terasiemens, ElectricSusceptanceUnit.Terasiemens);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Energy.g.cs
index f6567f67d6..08cdd19843 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Energy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Energy.g.cs
@@ -51,7 +51,6 @@ public struct Energy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Energy(double value, EnergyUnit unit)
{
_value = value;
@@ -286,241 +285,201 @@ public Energy(double value, EnergyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromBritishThermalUnits(double britishthermalunits) => new Energy(britishthermalunits, EnergyUnit.BritishThermalUnit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromCalories(double calories) => new Energy(calories, EnergyUnit.Calorie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromDecathermsEc(double decathermsec) => new Energy(decathermsec, EnergyUnit.DecathermEc);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromDecathermsImperial(double decathermsimperial) => new Energy(decathermsimperial, EnergyUnit.DecathermImperial);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromDecathermsUs(double decathermsus) => new Energy(decathermsus, EnergyUnit.DecathermUs);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromElectronVolts(double electronvolts) => new Energy(electronvolts, EnergyUnit.ElectronVolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromErgs(double ergs) => new Energy(ergs, EnergyUnit.Erg);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromFootPounds(double footpounds) => new Energy(footpounds, EnergyUnit.FootPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromGigabritishThermalUnits(double gigabritishthermalunits) => new Energy(gigabritishthermalunits, EnergyUnit.GigabritishThermalUnit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromGigaelectronVolts(double gigaelectronvolts) => new Energy(gigaelectronvolts, EnergyUnit.GigaelectronVolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromGigajoules(double gigajoules) => new Energy(gigajoules, EnergyUnit.Gigajoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromGigawattDays(double gigawattdays) => new Energy(gigawattdays, EnergyUnit.GigawattDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromGigawattHours(double gigawatthours) => new Energy(gigawatthours, EnergyUnit.GigawattHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromHorsepowerHours(double horsepowerhours) => new Energy(horsepowerhours, EnergyUnit.HorsepowerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromJoules(double joules) => new Energy(joules, EnergyUnit.Joule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKilobritishThermalUnits(double kilobritishthermalunits) => new Energy(kilobritishthermalunits, EnergyUnit.KilobritishThermalUnit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKilocalories(double kilocalories) => new Energy(kilocalories, EnergyUnit.Kilocalorie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKiloelectronVolts(double kiloelectronvolts) => new Energy(kiloelectronvolts, EnergyUnit.KiloelectronVolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKilojoules(double kilojoules) => new Energy(kilojoules, EnergyUnit.Kilojoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKilowattDays(double kilowattdays) => new Energy(kilowattdays, EnergyUnit.KilowattDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromKilowattHours(double kilowatthours) => new Energy(kilowatthours, EnergyUnit.KilowattHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegabritishThermalUnits(double megabritishthermalunits) => new Energy(megabritishthermalunits, EnergyUnit.MegabritishThermalUnit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegacalories(double megacalories) => new Energy(megacalories, EnergyUnit.Megacalorie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegaelectronVolts(double megaelectronvolts) => new Energy(megaelectronvolts, EnergyUnit.MegaelectronVolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegajoules(double megajoules) => new Energy(megajoules, EnergyUnit.Megajoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegawattDays(double megawattdays) => new Energy(megawattdays, EnergyUnit.MegawattDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMegawattHours(double megawatthours) => new Energy(megawatthours, EnergyUnit.MegawattHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMicrojoules(double microjoules) => new Energy(microjoules, EnergyUnit.Microjoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromMillijoules(double millijoules) => new Energy(millijoules, EnergyUnit.Millijoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromNanojoules(double nanojoules) => new Energy(nanojoules, EnergyUnit.Nanojoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromPetajoules(double petajoules) => new Energy(petajoules, EnergyUnit.Petajoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromTeraelectronVolts(double teraelectronvolts) => new Energy(teraelectronvolts, EnergyUnit.TeraelectronVolt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromTerajoules(double terajoules) => new Energy(terajoules, EnergyUnit.Terajoule);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromTerawattDays(double terawattdays) => new Energy(terawattdays, EnergyUnit.TerawattDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromTerawattHours(double terawatthours) => new Energy(terawatthours, EnergyUnit.TerawattHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromThermsEc(double thermsec) => new Energy(thermsec, EnergyUnit.ThermEc);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromThermsImperial(double thermsimperial) => new Energy(thermsimperial, EnergyUnit.ThermImperial);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromThermsUs(double thermsus) => new Energy(thermsus, EnergyUnit.ThermUs);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromWattDays(double wattdays) => new Energy(wattdays, EnergyUnit.WattDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Energy FromWattHours(double watthours) => new Energy(watthours, EnergyUnit.WattHour);
///
@@ -568,25 +527,25 @@ private double GetValueInBaseUnit()
EnergyUnit.DecathermEc => (_value * 1.05505585262e8) * 1e1d,
EnergyUnit.DecathermImperial => (_value * 1.05505585257348e8) * 1e1d,
EnergyUnit.DecathermUs => (_value * 1.054804e8) * 1e1d,
- EnergyUnit.ElectronVolt => _value * 1.602176565e-19,
+ EnergyUnit.ElectronVolt => _value * 1.602176634e-19,
EnergyUnit.Erg => _value * 1e-7,
- EnergyUnit.FootPound => _value * 1.355817948,
+ EnergyUnit.FootPound => _value * 1.3558179483314004,
EnergyUnit.GigabritishThermalUnit => (_value * 1055.05585262) * 1e9d,
- EnergyUnit.GigaelectronVolt => (_value * 1.602176565e-19) * 1e9d,
+ EnergyUnit.GigaelectronVolt => (_value * 1.602176634e-19) * 1e9d,
EnergyUnit.Gigajoule => (_value) * 1e9d,
EnergyUnit.GigawattDay => (_value * 24 * 3600d) * 1e9d,
EnergyUnit.GigawattHour => (_value * 3600d) * 1e9d,
- EnergyUnit.HorsepowerHour => _value * 2.6845195377e6,
+ EnergyUnit.HorsepowerHour => _value * 76.0402249 * 9.80665 * 3600,
EnergyUnit.Joule => _value,
EnergyUnit.KilobritishThermalUnit => (_value * 1055.05585262) * 1e3d,
EnergyUnit.Kilocalorie => (_value * 4.184) * 1e3d,
- EnergyUnit.KiloelectronVolt => (_value * 1.602176565e-19) * 1e3d,
+ EnergyUnit.KiloelectronVolt => (_value * 1.602176634e-19) * 1e3d,
EnergyUnit.Kilojoule => (_value) * 1e3d,
EnergyUnit.KilowattDay => (_value * 24 * 3600d) * 1e3d,
EnergyUnit.KilowattHour => (_value * 3600d) * 1e3d,
EnergyUnit.MegabritishThermalUnit => (_value * 1055.05585262) * 1e6d,
EnergyUnit.Megacalorie => (_value * 4.184) * 1e6d,
- EnergyUnit.MegaelectronVolt => (_value * 1.602176565e-19) * 1e6d,
+ EnergyUnit.MegaelectronVolt => (_value * 1.602176634e-19) * 1e6d,
EnergyUnit.Megajoule => (_value) * 1e6d,
EnergyUnit.MegawattDay => (_value * 24 * 3600d) * 1e6d,
EnergyUnit.MegawattHour => (_value * 3600d) * 1e6d,
@@ -594,7 +553,7 @@ private double GetValueInBaseUnit()
EnergyUnit.Millijoule => (_value) * 1e-3d,
EnergyUnit.Nanojoule => (_value) * 1e-9d,
EnergyUnit.Petajoule => (_value) * 1e15d,
- EnergyUnit.TeraelectronVolt => (_value * 1.602176565e-19) * 1e12d,
+ EnergyUnit.TeraelectronVolt => (_value * 1.602176634e-19) * 1e12d,
EnergyUnit.Terajoule => (_value) * 1e12d,
EnergyUnit.TerawattDay => (_value * 24 * 3600d) * 1e12d,
EnergyUnit.TerawattHour => (_value * 3600d) * 1e12d,
@@ -621,25 +580,25 @@ private double GetValueAs(EnergyUnit unit)
EnergyUnit.DecathermEc => (baseUnitValue / 1.05505585262e8) / 1e1d,
EnergyUnit.DecathermImperial => (baseUnitValue / 1.05505585257348e8) / 1e1d,
EnergyUnit.DecathermUs => (baseUnitValue / 1.054804e8) / 1e1d,
- EnergyUnit.ElectronVolt => baseUnitValue / 1.602176565e-19,
+ EnergyUnit.ElectronVolt => baseUnitValue / 1.602176634e-19,
EnergyUnit.Erg => baseUnitValue / 1e-7,
- EnergyUnit.FootPound => baseUnitValue / 1.355817948,
+ EnergyUnit.FootPound => baseUnitValue / 1.3558179483314004,
EnergyUnit.GigabritishThermalUnit => (baseUnitValue / 1055.05585262) / 1e9d,
- EnergyUnit.GigaelectronVolt => (baseUnitValue / 1.602176565e-19) / 1e9d,
+ EnergyUnit.GigaelectronVolt => (baseUnitValue / 1.602176634e-19) / 1e9d,
EnergyUnit.Gigajoule => (baseUnitValue) / 1e9d,
EnergyUnit.GigawattDay => (baseUnitValue / (24 * 3600d)) / 1e9d,
EnergyUnit.GigawattHour => (baseUnitValue / 3600d) / 1e9d,
- EnergyUnit.HorsepowerHour => baseUnitValue / 2.6845195377e6,
+ EnergyUnit.HorsepowerHour => baseUnitValue / (76.0402249 * 9.80665 * 3600),
EnergyUnit.Joule => baseUnitValue,
EnergyUnit.KilobritishThermalUnit => (baseUnitValue / 1055.05585262) / 1e3d,
EnergyUnit.Kilocalorie => (baseUnitValue / 4.184) / 1e3d,
- EnergyUnit.KiloelectronVolt => (baseUnitValue / 1.602176565e-19) / 1e3d,
+ EnergyUnit.KiloelectronVolt => (baseUnitValue / 1.602176634e-19) / 1e3d,
EnergyUnit.Kilojoule => (baseUnitValue) / 1e3d,
EnergyUnit.KilowattDay => (baseUnitValue / (24 * 3600d)) / 1e3d,
EnergyUnit.KilowattHour => (baseUnitValue / 3600d) / 1e3d,
EnergyUnit.MegabritishThermalUnit => (baseUnitValue / 1055.05585262) / 1e6d,
EnergyUnit.Megacalorie => (baseUnitValue / 4.184) / 1e6d,
- EnergyUnit.MegaelectronVolt => (baseUnitValue / 1.602176565e-19) / 1e6d,
+ EnergyUnit.MegaelectronVolt => (baseUnitValue / 1.602176634e-19) / 1e6d,
EnergyUnit.Megajoule => (baseUnitValue) / 1e6d,
EnergyUnit.MegawattDay => (baseUnitValue / (24 * 3600d)) / 1e6d,
EnergyUnit.MegawattHour => (baseUnitValue / 3600d) / 1e6d,
@@ -647,7 +606,7 @@ private double GetValueAs(EnergyUnit unit)
EnergyUnit.Millijoule => (baseUnitValue) / 1e-3d,
EnergyUnit.Nanojoule => (baseUnitValue) / 1e-9d,
EnergyUnit.Petajoule => (baseUnitValue) / 1e15d,
- EnergyUnit.TeraelectronVolt => (baseUnitValue / 1.602176565e-19) / 1e12d,
+ EnergyUnit.TeraelectronVolt => (baseUnitValue / 1.602176634e-19) / 1e12d,
EnergyUnit.Terajoule => (baseUnitValue) / 1e12d,
EnergyUnit.TerawattDay => (baseUnitValue / (24 * 3600d)) / 1e12d,
EnergyUnit.TerawattHour => (baseUnitValue / 3600d) / 1e12d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/EnergyDensity.g.cs
index f424e10a89..5a12ff7098 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/EnergyDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/EnergyDensity.g.cs
@@ -51,7 +51,6 @@ public struct EnergyDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public EnergyDensity(double value, EnergyDensityUnit unit)
{
_value = value;
@@ -146,73 +145,61 @@ public EnergyDensity(double value, EnergyDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromGigajoulesPerCubicMeter(double gigajoulespercubicmeter) => new EnergyDensity(gigajoulespercubicmeter, EnergyDensityUnit.GigajoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromGigawattHoursPerCubicMeter(double gigawatthourspercubicmeter) => new EnergyDensity(gigawatthourspercubicmeter, EnergyDensityUnit.GigawattHourPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromJoulesPerCubicMeter(double joulespercubicmeter) => new EnergyDensity(joulespercubicmeter, EnergyDensityUnit.JoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromKilojoulesPerCubicMeter(double kilojoulespercubicmeter) => new EnergyDensity(kilojoulespercubicmeter, EnergyDensityUnit.KilojoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromKilowattHoursPerCubicMeter(double kilowatthourspercubicmeter) => new EnergyDensity(kilowatthourspercubicmeter, EnergyDensityUnit.KilowattHourPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromMegajoulesPerCubicMeter(double megajoulespercubicmeter) => new EnergyDensity(megajoulespercubicmeter, EnergyDensityUnit.MegajoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromMegawattHoursPerCubicMeter(double megawatthourspercubicmeter) => new EnergyDensity(megawatthourspercubicmeter, EnergyDensityUnit.MegawattHourPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromPetajoulesPerCubicMeter(double petajoulespercubicmeter) => new EnergyDensity(petajoulespercubicmeter, EnergyDensityUnit.PetajoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromPetawattHoursPerCubicMeter(double petawatthourspercubicmeter) => new EnergyDensity(petawatthourspercubicmeter, EnergyDensityUnit.PetawattHourPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromTerajoulesPerCubicMeter(double terajoulespercubicmeter) => new EnergyDensity(terajoulespercubicmeter, EnergyDensityUnit.TerajoulePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromTerawattHoursPerCubicMeter(double terawatthourspercubicmeter) => new EnergyDensity(terawatthourspercubicmeter, EnergyDensityUnit.TerawattHourPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static EnergyDensity FromWattHoursPerCubicMeter(double watthourspercubicmeter) => new EnergyDensity(watthourspercubicmeter, EnergyDensityUnit.WattHourPerCubicMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Entropy.g.cs
index 4cd57f3a16..efa688a066 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Entropy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Entropy.g.cs
@@ -51,7 +51,6 @@ public struct Entropy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Entropy(double value, EntropyUnit unit)
{
_value = value;
@@ -121,43 +120,36 @@ public Entropy(double value, EntropyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromCaloriesPerKelvin(double caloriesperkelvin) => new Entropy(caloriesperkelvin, EntropyUnit.CaloriePerKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromJoulesPerDegreeCelsius(double joulesperdegreecelsius) => new Entropy(joulesperdegreecelsius, EntropyUnit.JoulePerDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromJoulesPerKelvin(double joulesperkelvin) => new Entropy(joulesperkelvin, EntropyUnit.JoulePerKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromKilocaloriesPerKelvin(double kilocaloriesperkelvin) => new Entropy(kilocaloriesperkelvin, EntropyUnit.KilocaloriePerKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromKilojoulesPerDegreeCelsius(double kilojoulesperdegreecelsius) => new Entropy(kilojoulesperdegreecelsius, EntropyUnit.KilojoulePerDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromKilojoulesPerKelvin(double kilojoulesperkelvin) => new Entropy(kilojoulesperkelvin, EntropyUnit.KilojoulePerKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Entropy FromMegajoulesPerKelvin(double megajoulesperkelvin) => new Entropy(megajoulesperkelvin, EntropyUnit.MegajoulePerKelvin);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/FluidResistance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/FluidResistance.g.cs
index a4bc7fbb7a..37900b2ed9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/FluidResistance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/FluidResistance.g.cs
@@ -54,7 +54,6 @@ public struct FluidResistance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public FluidResistance(double value, FluidResistanceUnit unit)
{
_value = value;
@@ -184,115 +183,96 @@ public FluidResistance(double value, FluidResistanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromDyneSecondsPerCentimeterToTheFifth(double dynesecondspercentimetertothefifth) => new FluidResistance(dynesecondspercentimetertothefifth, FluidResistanceUnit.DyneSecondPerCentimeterToTheFifth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMegapascalSecondsPerCubicMeter(double megapascalsecondspercubicmeter) => new FluidResistance(megapascalsecondspercubicmeter, FluidResistanceUnit.MegapascalSecondPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercuryMinutesPerCubicCentimeter(double millimetermercuryminutespercubiccentimeter) => new FluidResistance(millimetermercuryminutespercubiccentimeter, FluidResistanceUnit.MillimeterMercuryMinutePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercuryMinutesPerCubicMeter(double millimetermercuryminutespercubicmeter) => new FluidResistance(millimetermercuryminutespercubicmeter, FluidResistanceUnit.MillimeterMercuryMinutePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercuryMinutesPerLiter(double millimetermercuryminutesperliter) => new FluidResistance(millimetermercuryminutesperliter, FluidResistanceUnit.MillimeterMercuryMinutePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercuryMinutesPerMilliliter(double millimetermercuryminutespermilliliter) => new FluidResistance(millimetermercuryminutespermilliliter, FluidResistanceUnit.MillimeterMercuryMinutePerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercurySecondsPerCubicCentimeter(double millimetermercurysecondspercubiccentimeter) => new FluidResistance(millimetermercurysecondspercubiccentimeter, FluidResistanceUnit.MillimeterMercurySecondPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercurySecondsPerCubicMeter(double millimetermercurysecondspercubicmeter) => new FluidResistance(millimetermercurysecondspercubicmeter, FluidResistanceUnit.MillimeterMercurySecondPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercurySecondsPerLiter(double millimetermercurysecondsperliter) => new FluidResistance(millimetermercurysecondsperliter, FluidResistanceUnit.MillimeterMercurySecondPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromMillimeterMercurySecondsPerMilliliter(double millimetermercurysecondspermilliliter) => new FluidResistance(millimetermercurysecondspermilliliter, FluidResistanceUnit.MillimeterMercurySecondPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalMinutesPerCubicCentimeter(double pascalminutespercubiccentimeter) => new FluidResistance(pascalminutespercubiccentimeter, FluidResistanceUnit.PascalMinutePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalMinutesPerCubicMeter(double pascalminutespercubicmeter) => new FluidResistance(pascalminutespercubicmeter, FluidResistanceUnit.PascalMinutePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalMinutesPerLiter(double pascalminutesperliter) => new FluidResistance(pascalminutesperliter, FluidResistanceUnit.PascalMinutePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalMinutesPerMilliliter(double pascalminutespermilliliter) => new FluidResistance(pascalminutespermilliliter, FluidResistanceUnit.PascalMinutePerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalSecondsPerCubicCentimeter(double pascalsecondspercubiccentimeter) => new FluidResistance(pascalsecondspercubiccentimeter, FluidResistanceUnit.PascalSecondPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalSecondsPerCubicMeter(double pascalsecondspercubicmeter) => new FluidResistance(pascalsecondspercubicmeter, FluidResistanceUnit.PascalSecondPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalSecondsPerLiter(double pascalsecondsperliter) => new FluidResistance(pascalsecondsperliter, FluidResistanceUnit.PascalSecondPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromPascalSecondsPerMilliliter(double pascalsecondspermilliliter) => new FluidResistance(pascalsecondspermilliliter, FluidResistanceUnit.PascalSecondPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FluidResistance FromWoodUnits(double woodunits) => new FluidResistance(woodunits, FluidResistanceUnit.WoodUnit);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Force.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Force.g.cs
index bbea65bc6d..0b8c6e26fb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Force.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Force.g.cs
@@ -51,7 +51,6 @@ public struct Force
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Force(double value, ForceUnit unit)
{
_value = value;
@@ -161,91 +160,76 @@ public Force(double value, ForceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromDecanewtons(double decanewtons) => new Force(decanewtons, ForceUnit.Decanewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromDyne(double dyne) => new Force(dyne, ForceUnit.Dyn);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromKilogramsForce(double kilogramsforce) => new Force(kilogramsforce, ForceUnit.KilogramForce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromKilonewtons(double kilonewtons) => new Force(kilonewtons, ForceUnit.Kilonewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromKiloPonds(double kiloponds) => new Force(kiloponds, ForceUnit.KiloPond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromKilopoundsForce(double kilopoundsforce) => new Force(kilopoundsforce, ForceUnit.KilopoundForce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromMeganewtons(double meganewtons) => new Force(meganewtons, ForceUnit.Meganewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromMicronewtons(double micronewtons) => new Force(micronewtons, ForceUnit.Micronewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromMillinewtons(double millinewtons) => new Force(millinewtons, ForceUnit.Millinewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromNewtons(double newtons) => new Force(newtons, ForceUnit.Newton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromOunceForce(double ounceforce) => new Force(ounceforce, ForceUnit.OunceForce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromPoundals(double poundals) => new Force(poundals, ForceUnit.Poundal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromPoundsForce(double poundsforce) => new Force(poundsforce, ForceUnit.PoundForce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromShortTonsForce(double shorttonsforce) => new Force(shorttonsforce, ForceUnit.ShortTonForce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Force FromTonnesForce(double tonnesforce) => new Force(tonnesforce, ForceUnit.TonneForce);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForceChangeRate.g.cs
index 5fdcce6b67..a06c8d9e20 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForceChangeRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForceChangeRate.g.cs
@@ -51,7 +51,6 @@ public struct ForceChangeRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ForceChangeRate(double value, ForceChangeRateUnit unit)
{
_value = value;
@@ -161,91 +160,76 @@ public ForceChangeRate(double value, ForceChangeRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromCentinewtonsPerSecond(double centinewtonspersecond) => new ForceChangeRate(centinewtonspersecond, ForceChangeRateUnit.CentinewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromDecanewtonsPerMinute(double decanewtonsperminute) => new ForceChangeRate(decanewtonsperminute, ForceChangeRateUnit.DecanewtonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromDecanewtonsPerSecond(double decanewtonspersecond) => new ForceChangeRate(decanewtonspersecond, ForceChangeRateUnit.DecanewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromDecinewtonsPerSecond(double decinewtonspersecond) => new ForceChangeRate(decinewtonspersecond, ForceChangeRateUnit.DecinewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromKilonewtonsPerMinute(double kilonewtonsperminute) => new ForceChangeRate(kilonewtonsperminute, ForceChangeRateUnit.KilonewtonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromKilonewtonsPerSecond(double kilonewtonspersecond) => new ForceChangeRate(kilonewtonspersecond, ForceChangeRateUnit.KilonewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromKilopoundsForcePerMinute(double kilopoundsforceperminute) => new ForceChangeRate(kilopoundsforceperminute, ForceChangeRateUnit.KilopoundForcePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromKilopoundsForcePerSecond(double kilopoundsforcepersecond) => new ForceChangeRate(kilopoundsforcepersecond, ForceChangeRateUnit.KilopoundForcePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromMicronewtonsPerSecond(double micronewtonspersecond) => new ForceChangeRate(micronewtonspersecond, ForceChangeRateUnit.MicronewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromMillinewtonsPerSecond(double millinewtonspersecond) => new ForceChangeRate(millinewtonspersecond, ForceChangeRateUnit.MillinewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromNanonewtonsPerSecond(double nanonewtonspersecond) => new ForceChangeRate(nanonewtonspersecond, ForceChangeRateUnit.NanonewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromNewtonsPerMinute(double newtonsperminute) => new ForceChangeRate(newtonsperminute, ForceChangeRateUnit.NewtonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromNewtonsPerSecond(double newtonspersecond) => new ForceChangeRate(newtonspersecond, ForceChangeRateUnit.NewtonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromPoundsForcePerMinute(double poundsforceperminute) => new ForceChangeRate(poundsforceperminute, ForceChangeRateUnit.PoundForcePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForceChangeRate FromPoundsForcePerSecond(double poundsforcepersecond) => new ForceChangeRate(poundsforcepersecond, ForceChangeRateUnit.PoundForcePerSecond);
///
@@ -294,15 +278,15 @@ private double GetValueInBaseUnit()
ForceChangeRateUnit.DecinewtonPerSecond => (_value) * 1e-1d,
ForceChangeRateUnit.KilonewtonPerMinute => (_value / 60) * 1e3d,
ForceChangeRateUnit.KilonewtonPerSecond => (_value) * 1e3d,
- ForceChangeRateUnit.KilopoundForcePerMinute => (_value * 4.4482216152605095551842641431421 / 60) * 1e3d,
- ForceChangeRateUnit.KilopoundForcePerSecond => (_value * 4.4482216152605095551842641431421) * 1e3d,
+ ForceChangeRateUnit.KilopoundForcePerMinute => (_value * 4.4482216152605 / 60) * 1e3d,
+ ForceChangeRateUnit.KilopoundForcePerSecond => (_value * 4.4482216152605) * 1e3d,
ForceChangeRateUnit.MicronewtonPerSecond => (_value) * 1e-6d,
ForceChangeRateUnit.MillinewtonPerSecond => (_value) * 1e-3d,
ForceChangeRateUnit.NanonewtonPerSecond => (_value) * 1e-9d,
ForceChangeRateUnit.NewtonPerMinute => _value / 60,
ForceChangeRateUnit.NewtonPerSecond => _value,
- ForceChangeRateUnit.PoundForcePerMinute => _value * 4.4482216152605095551842641431421 / 60,
- ForceChangeRateUnit.PoundForcePerSecond => _value * 4.4482216152605095551842641431421,
+ ForceChangeRateUnit.PoundForcePerMinute => _value * 4.4482216152605 / 60,
+ ForceChangeRateUnit.PoundForcePerSecond => _value * 4.4482216152605,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -322,15 +306,15 @@ private double GetValueAs(ForceChangeRateUnit unit)
ForceChangeRateUnit.DecinewtonPerSecond => (baseUnitValue) / 1e-1d,
ForceChangeRateUnit.KilonewtonPerMinute => (baseUnitValue * 60) / 1e3d,
ForceChangeRateUnit.KilonewtonPerSecond => (baseUnitValue) / 1e3d,
- ForceChangeRateUnit.KilopoundForcePerMinute => (baseUnitValue / 4.4482216152605095551842641431421 * 60) / 1e3d,
- ForceChangeRateUnit.KilopoundForcePerSecond => (baseUnitValue / 4.4482216152605095551842641431421) / 1e3d,
+ ForceChangeRateUnit.KilopoundForcePerMinute => (baseUnitValue / 4.4482216152605 * 60) / 1e3d,
+ ForceChangeRateUnit.KilopoundForcePerSecond => (baseUnitValue / 4.4482216152605) / 1e3d,
ForceChangeRateUnit.MicronewtonPerSecond => (baseUnitValue) / 1e-6d,
ForceChangeRateUnit.MillinewtonPerSecond => (baseUnitValue) / 1e-3d,
ForceChangeRateUnit.NanonewtonPerSecond => (baseUnitValue) / 1e-9d,
ForceChangeRateUnit.NewtonPerMinute => baseUnitValue * 60,
ForceChangeRateUnit.NewtonPerSecond => baseUnitValue,
- ForceChangeRateUnit.PoundForcePerMinute => baseUnitValue / 4.4482216152605095551842641431421 * 60,
- ForceChangeRateUnit.PoundForcePerSecond => baseUnitValue / 4.4482216152605095551842641431421,
+ ForceChangeRateUnit.PoundForcePerMinute => baseUnitValue / 4.4482216152605 * 60,
+ ForceChangeRateUnit.PoundForcePerSecond => baseUnitValue / 4.4482216152605,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForcePerLength.g.cs
index 0567530380..b8e75bd9d3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForcePerLength.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ForcePerLength.g.cs
@@ -51,7 +51,6 @@ public struct ForcePerLength
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ForcePerLength(double value, ForcePerLengthUnit unit)
{
_value = value;
@@ -276,229 +275,191 @@ public ForcePerLength(double value, ForcePerLengthUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromCentinewtonsPerCentimeter(double centinewtonspercentimeter) => new ForcePerLength(centinewtonspercentimeter, ForcePerLengthUnit.CentinewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromCentinewtonsPerMeter(double centinewtonspermeter) => new ForcePerLength(centinewtonspermeter, ForcePerLengthUnit.CentinewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromCentinewtonsPerMillimeter(double centinewtonspermillimeter) => new ForcePerLength(centinewtonspermillimeter, ForcePerLengthUnit.CentinewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecanewtonsPerCentimeter(double decanewtonspercentimeter) => new ForcePerLength(decanewtonspercentimeter, ForcePerLengthUnit.DecanewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecanewtonsPerMeter(double decanewtonspermeter) => new ForcePerLength(decanewtonspermeter, ForcePerLengthUnit.DecanewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecanewtonsPerMillimeter(double decanewtonspermillimeter) => new ForcePerLength(decanewtonspermillimeter, ForcePerLengthUnit.DecanewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecinewtonsPerCentimeter(double decinewtonspercentimeter) => new ForcePerLength(decinewtonspercentimeter, ForcePerLengthUnit.DecinewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecinewtonsPerMeter(double decinewtonspermeter) => new ForcePerLength(decinewtonspermeter, ForcePerLengthUnit.DecinewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromDecinewtonsPerMillimeter(double decinewtonspermillimeter) => new ForcePerLength(decinewtonspermillimeter, ForcePerLengthUnit.DecinewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilogramsForcePerCentimeter(double kilogramsforcepercentimeter) => new ForcePerLength(kilogramsforcepercentimeter, ForcePerLengthUnit.KilogramForcePerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilogramsForcePerMeter(double kilogramsforcepermeter) => new ForcePerLength(kilogramsforcepermeter, ForcePerLengthUnit.KilogramForcePerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilogramsForcePerMillimeter(double kilogramsforcepermillimeter) => new ForcePerLength(kilogramsforcepermillimeter, ForcePerLengthUnit.KilogramForcePerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilonewtonsPerCentimeter(double kilonewtonspercentimeter) => new ForcePerLength(kilonewtonspercentimeter, ForcePerLengthUnit.KilonewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilonewtonsPerMeter(double kilonewtonspermeter) => new ForcePerLength(kilonewtonspermeter, ForcePerLengthUnit.KilonewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilonewtonsPerMillimeter(double kilonewtonspermillimeter) => new ForcePerLength(kilonewtonspermillimeter, ForcePerLengthUnit.KilonewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilopoundsForcePerFoot(double kilopoundsforceperfoot) => new ForcePerLength(kilopoundsforceperfoot, ForcePerLengthUnit.KilopoundForcePerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromKilopoundsForcePerInch(double kilopoundsforceperinch) => new ForcePerLength(kilopoundsforceperinch, ForcePerLengthUnit.KilopoundForcePerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMeganewtonsPerCentimeter(double meganewtonspercentimeter) => new ForcePerLength(meganewtonspercentimeter, ForcePerLengthUnit.MeganewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMeganewtonsPerMeter(double meganewtonspermeter) => new ForcePerLength(meganewtonspermeter, ForcePerLengthUnit.MeganewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMeganewtonsPerMillimeter(double meganewtonspermillimeter) => new ForcePerLength(meganewtonspermillimeter, ForcePerLengthUnit.MeganewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMicronewtonsPerCentimeter(double micronewtonspercentimeter) => new ForcePerLength(micronewtonspercentimeter, ForcePerLengthUnit.MicronewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMicronewtonsPerMeter(double micronewtonspermeter) => new ForcePerLength(micronewtonspermeter, ForcePerLengthUnit.MicronewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMicronewtonsPerMillimeter(double micronewtonspermillimeter) => new ForcePerLength(micronewtonspermillimeter, ForcePerLengthUnit.MicronewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMillinewtonsPerCentimeter(double millinewtonspercentimeter) => new ForcePerLength(millinewtonspercentimeter, ForcePerLengthUnit.MillinewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMillinewtonsPerMeter(double millinewtonspermeter) => new ForcePerLength(millinewtonspermeter, ForcePerLengthUnit.MillinewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromMillinewtonsPerMillimeter(double millinewtonspermillimeter) => new ForcePerLength(millinewtonspermillimeter, ForcePerLengthUnit.MillinewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNanonewtonsPerCentimeter(double nanonewtonspercentimeter) => new ForcePerLength(nanonewtonspercentimeter, ForcePerLengthUnit.NanonewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNanonewtonsPerMeter(double nanonewtonspermeter) => new ForcePerLength(nanonewtonspermeter, ForcePerLengthUnit.NanonewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNanonewtonsPerMillimeter(double nanonewtonspermillimeter) => new ForcePerLength(nanonewtonspermillimeter, ForcePerLengthUnit.NanonewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNewtonsPerCentimeter(double newtonspercentimeter) => new ForcePerLength(newtonspercentimeter, ForcePerLengthUnit.NewtonPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNewtonsPerMeter(double newtonspermeter) => new ForcePerLength(newtonspermeter, ForcePerLengthUnit.NewtonPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromNewtonsPerMillimeter(double newtonspermillimeter) => new ForcePerLength(newtonspermillimeter, ForcePerLengthUnit.NewtonPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromPoundsForcePerFoot(double poundsforceperfoot) => new ForcePerLength(poundsforceperfoot, ForcePerLengthUnit.PoundForcePerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromPoundsForcePerInch(double poundsforceperinch) => new ForcePerLength(poundsforceperinch, ForcePerLengthUnit.PoundForcePerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromPoundsForcePerYard(double poundsforceperyard) => new ForcePerLength(poundsforceperyard, ForcePerLengthUnit.PoundForcePerYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromTonnesForcePerCentimeter(double tonnesforcepercentimeter) => new ForcePerLength(tonnesforcepercentimeter, ForcePerLengthUnit.TonneForcePerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromTonnesForcePerMeter(double tonnesforcepermeter) => new ForcePerLength(tonnesforcepermeter, ForcePerLengthUnit.TonneForcePerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ForcePerLength FromTonnesForcePerMillimeter(double tonnesforcepermillimeter) => new ForcePerLength(tonnesforcepermillimeter, ForcePerLengthUnit.TonneForcePerMillimeter);
///
@@ -550,14 +511,14 @@ private double GetValueInBaseUnit()
ForcePerLengthUnit.DecinewtonPerCentimeter => (_value * 1e2) * 1e-1d,
ForcePerLengthUnit.DecinewtonPerMeter => (_value) * 1e-1d,
ForcePerLengthUnit.DecinewtonPerMillimeter => (_value * 1e3) * 1e-1d,
- ForcePerLengthUnit.KilogramForcePerCentimeter => _value * 980.665002864,
- ForcePerLengthUnit.KilogramForcePerMeter => _value * 9.80665002864,
- ForcePerLengthUnit.KilogramForcePerMillimeter => _value * 9.80665002864e3,
+ ForcePerLengthUnit.KilogramForcePerCentimeter => _value * 980.665,
+ ForcePerLengthUnit.KilogramForcePerMeter => _value * 9.80665,
+ ForcePerLengthUnit.KilogramForcePerMillimeter => _value * 9.80665e3,
ForcePerLengthUnit.KilonewtonPerCentimeter => (_value * 1e2) * 1e3d,
ForcePerLengthUnit.KilonewtonPerMeter => (_value) * 1e3d,
ForcePerLengthUnit.KilonewtonPerMillimeter => (_value * 1e3) * 1e3d,
- ForcePerLengthUnit.KilopoundForcePerFoot => _value * 14593.90292,
- ForcePerLengthUnit.KilopoundForcePerInch => _value * 1.75126835e5,
+ ForcePerLengthUnit.KilopoundForcePerFoot => _value * 4.4482216152605 / 0.3048e-3,
+ ForcePerLengthUnit.KilopoundForcePerInch => _value * 4.4482216152605 / 2.54e-5,
ForcePerLengthUnit.MeganewtonPerCentimeter => (_value * 1e2) * 1e6d,
ForcePerLengthUnit.MeganewtonPerMeter => (_value) * 1e6d,
ForcePerLengthUnit.MeganewtonPerMillimeter => (_value * 1e3) * 1e6d,
@@ -573,12 +534,12 @@ private double GetValueInBaseUnit()
ForcePerLengthUnit.NewtonPerCentimeter => _value * 1e2,
ForcePerLengthUnit.NewtonPerMeter => _value,
ForcePerLengthUnit.NewtonPerMillimeter => _value * 1e3,
- ForcePerLengthUnit.PoundForcePerFoot => _value * 14.59390292,
- ForcePerLengthUnit.PoundForcePerInch => _value * 1.75126835e2,
- ForcePerLengthUnit.PoundForcePerYard => _value * 4.864634307,
- ForcePerLengthUnit.TonneForcePerCentimeter => _value * 9.80665002864e5,
- ForcePerLengthUnit.TonneForcePerMeter => _value * 9.80665002864e3,
- ForcePerLengthUnit.TonneForcePerMillimeter => _value * 9.80665002864e6,
+ ForcePerLengthUnit.PoundForcePerFoot => _value * 4.4482216152605 / 0.3048,
+ ForcePerLengthUnit.PoundForcePerInch => _value * 4.4482216152605 / 2.54e-2,
+ ForcePerLengthUnit.PoundForcePerYard => _value * 4.4482216152605 / 0.9144,
+ ForcePerLengthUnit.TonneForcePerCentimeter => _value * 9.80665e5,
+ ForcePerLengthUnit.TonneForcePerMeter => _value * 9.80665e3,
+ ForcePerLengthUnit.TonneForcePerMillimeter => _value * 9.80665e6,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -601,14 +562,14 @@ private double GetValueAs(ForcePerLengthUnit unit)
ForcePerLengthUnit.DecinewtonPerCentimeter => (baseUnitValue / 1e2) / 1e-1d,
ForcePerLengthUnit.DecinewtonPerMeter => (baseUnitValue) / 1e-1d,
ForcePerLengthUnit.DecinewtonPerMillimeter => (baseUnitValue / 1e3) / 1e-1d,
- ForcePerLengthUnit.KilogramForcePerCentimeter => baseUnitValue / 980.665002864,
- ForcePerLengthUnit.KilogramForcePerMeter => baseUnitValue / 9.80665002864,
- ForcePerLengthUnit.KilogramForcePerMillimeter => baseUnitValue / 9.80665002864e3,
+ ForcePerLengthUnit.KilogramForcePerCentimeter => baseUnitValue / 980.665,
+ ForcePerLengthUnit.KilogramForcePerMeter => baseUnitValue / 9.80665,
+ ForcePerLengthUnit.KilogramForcePerMillimeter => baseUnitValue / 9.80665e3,
ForcePerLengthUnit.KilonewtonPerCentimeter => (baseUnitValue / 1e2) / 1e3d,
ForcePerLengthUnit.KilonewtonPerMeter => (baseUnitValue) / 1e3d,
ForcePerLengthUnit.KilonewtonPerMillimeter => (baseUnitValue / 1e3) / 1e3d,
- ForcePerLengthUnit.KilopoundForcePerFoot => baseUnitValue / 14593.90292,
- ForcePerLengthUnit.KilopoundForcePerInch => baseUnitValue / 1.75126835e5,
+ ForcePerLengthUnit.KilopoundForcePerFoot => baseUnitValue * 0.3048e-3 / 4.4482216152605,
+ ForcePerLengthUnit.KilopoundForcePerInch => baseUnitValue * 2.54e-5 / 4.4482216152605,
ForcePerLengthUnit.MeganewtonPerCentimeter => (baseUnitValue / 1e2) / 1e6d,
ForcePerLengthUnit.MeganewtonPerMeter => (baseUnitValue) / 1e6d,
ForcePerLengthUnit.MeganewtonPerMillimeter => (baseUnitValue / 1e3) / 1e6d,
@@ -624,12 +585,12 @@ private double GetValueAs(ForcePerLengthUnit unit)
ForcePerLengthUnit.NewtonPerCentimeter => baseUnitValue / 1e2,
ForcePerLengthUnit.NewtonPerMeter => baseUnitValue,
ForcePerLengthUnit.NewtonPerMillimeter => baseUnitValue / 1e3,
- ForcePerLengthUnit.PoundForcePerFoot => baseUnitValue / 14.59390292,
- ForcePerLengthUnit.PoundForcePerInch => baseUnitValue / 1.75126835e2,
- ForcePerLengthUnit.PoundForcePerYard => baseUnitValue / 4.864634307,
- ForcePerLengthUnit.TonneForcePerCentimeter => baseUnitValue / 9.80665002864e5,
- ForcePerLengthUnit.TonneForcePerMeter => baseUnitValue / 9.80665002864e3,
- ForcePerLengthUnit.TonneForcePerMillimeter => baseUnitValue / 9.80665002864e6,
+ ForcePerLengthUnit.PoundForcePerFoot => baseUnitValue * 0.3048 / 4.4482216152605,
+ ForcePerLengthUnit.PoundForcePerInch => baseUnitValue * 2.54e-2 / 4.4482216152605,
+ ForcePerLengthUnit.PoundForcePerYard => baseUnitValue * 0.9144 / 4.4482216152605,
+ ForcePerLengthUnit.TonneForcePerCentimeter => baseUnitValue / 9.80665e5,
+ ForcePerLengthUnit.TonneForcePerMeter => baseUnitValue / 9.80665e3,
+ ForcePerLengthUnit.TonneForcePerMillimeter => baseUnitValue / 9.80665e6,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Frequency.g.cs
index 0d3a501993..490f5bf925 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Frequency.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Frequency.g.cs
@@ -51,7 +51,6 @@ public struct Frequency
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Frequency(double value, FrequencyUnit unit)
{
_value = value;
@@ -84,11 +83,6 @@ public Frequency(double value, FrequencyUnit unit)
///
public double BeatsPerMinute => As(FrequencyUnit.BeatPerMinute);
- ///
- /// Gets a value of this quantity converted into
- ///
- public double BUnits => As(FrequencyUnit.BUnit);
-
///
/// Gets a value of this quantity converted into
///
@@ -151,79 +145,61 @@ public Frequency(double value, FrequencyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromBeatsPerMinute(double beatsperminute) => new Frequency(beatsperminute, FrequencyUnit.BeatPerMinute);
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Frequency FromBUnits(double bunits) => new Frequency(bunits, FrequencyUnit.BUnit);
-
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromCyclesPerHour(double cyclesperhour) => new Frequency(cyclesperhour, FrequencyUnit.CyclePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromCyclesPerMinute(double cyclesperminute) => new Frequency(cyclesperminute, FrequencyUnit.CyclePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromGigahertz(double gigahertz) => new Frequency(gigahertz, FrequencyUnit.Gigahertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromHertz(double hertz) => new Frequency(hertz, FrequencyUnit.Hertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromKilohertz(double kilohertz) => new Frequency(kilohertz, FrequencyUnit.Kilohertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromMegahertz(double megahertz) => new Frequency(megahertz, FrequencyUnit.Megahertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromMicrohertz(double microhertz) => new Frequency(microhertz, FrequencyUnit.Microhertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromMillihertz(double millihertz) => new Frequency(millihertz, FrequencyUnit.Millihertz);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromPerSecond(double persecond) => new Frequency(persecond, FrequencyUnit.PerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromRadiansPerSecond(double radianspersecond) => new Frequency(radianspersecond, FrequencyUnit.RadianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Frequency FromTerahertz(double terahertz) => new Frequency(terahertz, FrequencyUnit.Terahertz);
///
@@ -267,7 +243,6 @@ private double GetValueInBaseUnit()
return Unit switch
{
FrequencyUnit.BeatPerMinute => _value / 60,
- FrequencyUnit.BUnit => Math.Sqrt(_value * 1e3),
FrequencyUnit.CyclePerHour => _value / 3600,
FrequencyUnit.CyclePerMinute => _value / 60,
FrequencyUnit.Gigahertz => (_value) * 1e9d,
@@ -277,7 +252,7 @@ private double GetValueInBaseUnit()
FrequencyUnit.Microhertz => (_value) * 1e-6d,
FrequencyUnit.Millihertz => (_value) * 1e-3d,
FrequencyUnit.PerSecond => _value,
- FrequencyUnit.RadianPerSecond => _value / 6.2831853072,
+ FrequencyUnit.RadianPerSecond => _value / (2 * 3.1415926535897931),
FrequencyUnit.Terahertz => (_value) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -293,7 +268,6 @@ private double GetValueAs(FrequencyUnit unit)
return unit switch
{
FrequencyUnit.BeatPerMinute => baseUnitValue * 60,
- FrequencyUnit.BUnit => baseUnitValue * baseUnitValue * 1e-3,
FrequencyUnit.CyclePerHour => baseUnitValue * 3600,
FrequencyUnit.CyclePerMinute => baseUnitValue * 60,
FrequencyUnit.Gigahertz => (baseUnitValue) / 1e9d,
@@ -303,7 +277,7 @@ private double GetValueAs(FrequencyUnit unit)
FrequencyUnit.Microhertz => (baseUnitValue) / 1e-6d,
FrequencyUnit.Millihertz => (baseUnitValue) / 1e-3d,
FrequencyUnit.PerSecond => baseUnitValue,
- FrequencyUnit.RadianPerSecond => baseUnitValue * 6.2831853072,
+ FrequencyUnit.RadianPerSecond => baseUnitValue * (2 * 3.1415926535897931),
FrequencyUnit.Terahertz => (baseUnitValue) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/FuelEfficiency.g.cs
index d374bb20c3..de90703f76 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/FuelEfficiency.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/FuelEfficiency.g.cs
@@ -24,7 +24,7 @@ namespace UnitsNet
{
///
///
- /// Fuel efficiency is a form of thermal efficiency, meaning the ratio from effort to result of a process that converts chemical potential energy contained in a carrier (fuel) into kinetic energy or work. Fuel economy is stated as "fuel consumption" in liters per 100 kilometers (L/100 km). In countries using non-metric system, fuel economy is expressed in miles per gallon (mpg) (imperial galon or US galon).
+ /// In the context of transport, fuel economy is the energy efficiency of a particular vehicle, given as a ratio of distance traveled per unit of fuel consumed. In most countries, using the metric system, fuel economy is stated as "fuel consumption" in liters per 100 kilometers (L/100 km) or kilometers per liter (km/L or kmpl). In countries using non-metric system, fuel economy is expressed in miles per gallon (mpg) (imperial galon or US galon).
///
///
/// https://en.wikipedia.org/wiki/Fuel_efficiency
@@ -54,7 +54,6 @@ public struct FuelEfficiency
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public FuelEfficiency(double value, FuelEfficiencyUnit unit)
{
_value = value;
@@ -64,7 +63,7 @@ public FuelEfficiency(double value, FuelEfficiencyUnit unit)
///
/// The base unit of FuelEfficiency, which is Second. All conversions go via this value.
///
- public static FuelEfficiencyUnit BaseUnit { get; } = FuelEfficiencyUnit.LiterPer100Kilometers;
+ public static FuelEfficiencyUnit BaseUnit { get; } = FuelEfficiencyUnit.KilometerPerLiter;
///
/// Represents the largest possible value of FuelEfficiency.
@@ -85,7 +84,7 @@ public FuelEfficiency(double value, FuelEfficiencyUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double KilometersPerLiters => As(FuelEfficiencyUnit.KilometerPerLiter);
+ public double KilometersPerLiter => As(FuelEfficiencyUnit.KilometerPerLiter);
///
/// Gets a value of this quantity converted into
@@ -109,25 +108,21 @@ public FuelEfficiency(double value, FuelEfficiencyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static FuelEfficiency FromKilometersPerLiters(double kilometersperliters) => new FuelEfficiency(kilometersperliters, FuelEfficiencyUnit.KilometerPerLiter);
+ public static FuelEfficiency FromKilometersPerLiter(double kilometersperliter) => new FuelEfficiency(kilometersperliter, FuelEfficiencyUnit.KilometerPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FuelEfficiency FromLitersPer100Kilometers(double litersper100kilometers) => new FuelEfficiency(litersper100kilometers, FuelEfficiencyUnit.LiterPer100Kilometers);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FuelEfficiency FromMilesPerUkGallon(double milesperukgallon) => new FuelEfficiency(milesperukgallon, FuelEfficiencyUnit.MilePerUkGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static FuelEfficiency FromMilesPerUsGallon(double milesperusgallon) => new FuelEfficiency(milesperusgallon, FuelEfficiencyUnit.MilePerUsGallon);
///
@@ -170,10 +165,10 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- FuelEfficiencyUnit.KilometerPerLiter => 100 / _value,
- FuelEfficiencyUnit.LiterPer100Kilometers => _value,
- FuelEfficiencyUnit.MilePerUkGallon => (100 * 4.54609188) / (1.609344 * _value),
- FuelEfficiencyUnit.MilePerUsGallon => (100 * 3.785411784) / (1.609344 * _value),
+ FuelEfficiencyUnit.KilometerPerLiter => _value,
+ FuelEfficiencyUnit.LiterPer100Kilometers => 100 / _value,
+ FuelEfficiencyUnit.MilePerUkGallon => _value * 1.609344 / 4.54609,
+ FuelEfficiencyUnit.MilePerUsGallon => _value * 1.609344 / 3.785411784,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -187,10 +182,10 @@ private double GetValueAs(FuelEfficiencyUnit unit)
return unit switch
{
- FuelEfficiencyUnit.KilometerPerLiter => 100 / baseUnitValue,
- FuelEfficiencyUnit.LiterPer100Kilometers => baseUnitValue,
- FuelEfficiencyUnit.MilePerUkGallon => (100 * 4.54609188) / (1.609344 * baseUnitValue),
- FuelEfficiencyUnit.MilePerUsGallon => (100 * 3.785411784) / (1.609344 * baseUnitValue),
+ FuelEfficiencyUnit.KilometerPerLiter => baseUnitValue,
+ FuelEfficiencyUnit.LiterPer100Kilometers => 100 / baseUnitValue,
+ FuelEfficiencyUnit.MilePerUkGallon => baseUnitValue * 4.54609 / 1.609344,
+ FuelEfficiencyUnit.MilePerUsGallon => baseUnitValue * 3.785411784 / 1.609344,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatFlux.g.cs
index beaa445903..74bfb1a8e3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatFlux.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatFlux.g.cs
@@ -51,7 +51,6 @@ public struct HeatFlux
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public HeatFlux(double value, HeatFluxUnit unit)
{
_value = value;
@@ -176,109 +175,91 @@ public HeatFlux(double value, HeatFluxUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromBtusPerHourSquareFoot(double btusperhoursquarefoot) => new HeatFlux(btusperhoursquarefoot, HeatFluxUnit.BtuPerHourSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromBtusPerMinuteSquareFoot(double btusperminutesquarefoot) => new HeatFlux(btusperminutesquarefoot, HeatFluxUnit.BtuPerMinuteSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromBtusPerSecondSquareFoot(double btuspersecondsquarefoot) => new HeatFlux(btuspersecondsquarefoot, HeatFluxUnit.BtuPerSecondSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromBtusPerSecondSquareInch(double btuspersecondsquareinch) => new HeatFlux(btuspersecondsquareinch, HeatFluxUnit.BtuPerSecondSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromCaloriesPerSecondSquareCentimeter(double caloriespersecondsquarecentimeter) => new HeatFlux(caloriespersecondsquarecentimeter, HeatFluxUnit.CaloriePerSecondSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromCentiwattsPerSquareMeter(double centiwattspersquaremeter) => new HeatFlux(centiwattspersquaremeter, HeatFluxUnit.CentiwattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromDeciwattsPerSquareMeter(double deciwattspersquaremeter) => new HeatFlux(deciwattspersquaremeter, HeatFluxUnit.DeciwattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromKilocaloriesPerHourSquareMeter(double kilocaloriesperhoursquaremeter) => new HeatFlux(kilocaloriesperhoursquaremeter, HeatFluxUnit.KilocaloriePerHourSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromKilocaloriesPerSecondSquareCentimeter(double kilocaloriespersecondsquarecentimeter) => new HeatFlux(kilocaloriespersecondsquarecentimeter, HeatFluxUnit.KilocaloriePerSecondSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromKilowattsPerSquareMeter(double kilowattspersquaremeter) => new HeatFlux(kilowattspersquaremeter, HeatFluxUnit.KilowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromMicrowattsPerSquareMeter(double microwattspersquaremeter) => new HeatFlux(microwattspersquaremeter, HeatFluxUnit.MicrowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromMilliwattsPerSquareMeter(double milliwattspersquaremeter) => new HeatFlux(milliwattspersquaremeter, HeatFluxUnit.MilliwattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromNanowattsPerSquareMeter(double nanowattspersquaremeter) => new HeatFlux(nanowattspersquaremeter, HeatFluxUnit.NanowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromPoundsForcePerFootSecond(double poundsforceperfootsecond) => new HeatFlux(poundsforceperfootsecond, HeatFluxUnit.PoundForcePerFootSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromPoundsPerSecondCubed(double poundspersecondcubed) => new HeatFlux(poundspersecondcubed, HeatFluxUnit.PoundPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromWattsPerSquareFoot(double wattspersquarefoot) => new HeatFlux(wattspersquarefoot, HeatFluxUnit.WattPerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromWattsPerSquareInch(double wattspersquareinch) => new HeatFlux(wattspersquareinch, HeatFluxUnit.WattPerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatFlux FromWattsPerSquareMeter(double wattspersquaremeter) => new HeatFlux(wattspersquaremeter, HeatFluxUnit.WattPerSquareMeter);
///
@@ -321,23 +302,23 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- HeatFluxUnit.BtuPerHourSquareFoot => _value * 3.15459075,
- HeatFluxUnit.BtuPerMinuteSquareFoot => _value * 1.89275445e2,
- HeatFluxUnit.BtuPerSecondSquareFoot => _value * 1.13565267e4,
- HeatFluxUnit.BtuPerSecondSquareInch => _value * 1.63533984e6,
- HeatFluxUnit.CaloriePerSecondSquareCentimeter => _value * 4.1868e4,
+ HeatFluxUnit.BtuPerHourSquareFoot => _value * 1055.05585262 / (0.3048 * 0.3048 * 3600),
+ HeatFluxUnit.BtuPerMinuteSquareFoot => _value * 1055.05585262 / (0.3048 * 0.3048 * 60),
+ HeatFluxUnit.BtuPerSecondSquareFoot => _value * 1055.05585262 / (0.3048 * 0.3048),
+ HeatFluxUnit.BtuPerSecondSquareInch => _value * 1055.05585262 / (2.54e-2 * 2.54e-2),
+ HeatFluxUnit.CaloriePerSecondSquareCentimeter => _value * 4.184e4,
HeatFluxUnit.CentiwattPerSquareMeter => (_value) * 1e-2d,
HeatFluxUnit.DeciwattPerSquareMeter => (_value) * 1e-1d,
- HeatFluxUnit.KilocaloriePerHourSquareMeter => _value * 1.163,
- HeatFluxUnit.KilocaloriePerSecondSquareCentimeter => (_value * 4.1868e4) * 1e3d,
+ HeatFluxUnit.KilocaloriePerHourSquareMeter => _value * 4.184e3 / 3600,
+ HeatFluxUnit.KilocaloriePerSecondSquareCentimeter => (_value * 4.184e4) * 1e3d,
HeatFluxUnit.KilowattPerSquareMeter => (_value) * 1e3d,
HeatFluxUnit.MicrowattPerSquareMeter => (_value) * 1e-6d,
HeatFluxUnit.MilliwattPerSquareMeter => (_value) * 1e-3d,
HeatFluxUnit.NanowattPerSquareMeter => (_value) * 1e-9d,
- HeatFluxUnit.PoundForcePerFootSecond => _value * 1.459390293720636e1,
+ HeatFluxUnit.PoundForcePerFootSecond => _value * 1.3558179483314004 / 9.290304e-2,
HeatFluxUnit.PoundPerSecondCubed => _value * 4.5359237e-1,
- HeatFluxUnit.WattPerSquareFoot => _value * 1.07639e1,
- HeatFluxUnit.WattPerSquareInch => _value * 1.5500031e3,
+ HeatFluxUnit.WattPerSquareFoot => _value / (0.3048 * 0.3048),
+ HeatFluxUnit.WattPerSquareInch => _value / (2.54e-2 * 2.54e-2),
HeatFluxUnit.WattPerSquareMeter => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -352,23 +333,23 @@ private double GetValueAs(HeatFluxUnit unit)
return unit switch
{
- HeatFluxUnit.BtuPerHourSquareFoot => baseUnitValue / 3.15459075,
- HeatFluxUnit.BtuPerMinuteSquareFoot => baseUnitValue / 1.89275445e2,
- HeatFluxUnit.BtuPerSecondSquareFoot => baseUnitValue / 1.13565267e4,
- HeatFluxUnit.BtuPerSecondSquareInch => baseUnitValue / 1.63533984e6,
- HeatFluxUnit.CaloriePerSecondSquareCentimeter => baseUnitValue / 4.1868e4,
+ HeatFluxUnit.BtuPerHourSquareFoot => baseUnitValue * (0.3048 * 0.3048 * 3600) / 1055.05585262,
+ HeatFluxUnit.BtuPerMinuteSquareFoot => baseUnitValue * (0.3048 * 0.3048 * 60) / 1055.05585262,
+ HeatFluxUnit.BtuPerSecondSquareFoot => baseUnitValue * (0.3048 * 0.3048) / 1055.05585262,
+ HeatFluxUnit.BtuPerSecondSquareInch => baseUnitValue * (2.54e-2 * 2.54e-2) / 1055.05585262,
+ HeatFluxUnit.CaloriePerSecondSquareCentimeter => baseUnitValue / 4.184e4,
HeatFluxUnit.CentiwattPerSquareMeter => (baseUnitValue) / 1e-2d,
HeatFluxUnit.DeciwattPerSquareMeter => (baseUnitValue) / 1e-1d,
- HeatFluxUnit.KilocaloriePerHourSquareMeter => baseUnitValue / 1.163,
- HeatFluxUnit.KilocaloriePerSecondSquareCentimeter => (baseUnitValue / 4.1868e4) / 1e3d,
+ HeatFluxUnit.KilocaloriePerHourSquareMeter => baseUnitValue * 3600 / 4.184e3,
+ HeatFluxUnit.KilocaloriePerSecondSquareCentimeter => (baseUnitValue / 4.184e4) / 1e3d,
HeatFluxUnit.KilowattPerSquareMeter => (baseUnitValue) / 1e3d,
HeatFluxUnit.MicrowattPerSquareMeter => (baseUnitValue) / 1e-6d,
HeatFluxUnit.MilliwattPerSquareMeter => (baseUnitValue) / 1e-3d,
HeatFluxUnit.NanowattPerSquareMeter => (baseUnitValue) / 1e-9d,
- HeatFluxUnit.PoundForcePerFootSecond => baseUnitValue / 1.459390293720636e1,
+ HeatFluxUnit.PoundForcePerFootSecond => baseUnitValue * 9.290304e-2 / 1.3558179483314004,
HeatFluxUnit.PoundPerSecondCubed => baseUnitValue / 4.5359237e-1,
- HeatFluxUnit.WattPerSquareFoot => baseUnitValue / 1.07639e1,
- HeatFluxUnit.WattPerSquareInch => baseUnitValue / 1.5500031e3,
+ HeatFluxUnit.WattPerSquareFoot => baseUnitValue * (0.3048 * 0.3048),
+ HeatFluxUnit.WattPerSquareInch => baseUnitValue * (2.54e-2 * 2.54e-2),
HeatFluxUnit.WattPerSquareMeter => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
index ac5e33a21d..2cc3802373 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs
@@ -51,7 +51,6 @@ public struct HeatTransferCoefficient
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public HeatTransferCoefficient(double value, HeatTransferCoefficientUnit unit)
{
_value = value;
@@ -84,12 +83,6 @@ public HeatTransferCoefficient(double value, HeatTransferCoefficientUnit unit)
///
public double BtusPerHourSquareFootDegreeFahrenheit => As(HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit);
- ///
- /// Gets a value of this quantity converted into
- ///
- [Obsolete("The name of this definition incorrectly omitted time as divisor, please use BtuPerHourSquareFootDegreeFahrenheit instead")]
- public double BtusPerSquareFootDegreeFahrenheit => As(HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit);
-
///
/// Gets a value of this quantity converted into
///
@@ -117,38 +110,26 @@ public HeatTransferCoefficient(double value, HeatTransferCoefficientUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatTransferCoefficient FromBtusPerHourSquareFootDegreeFahrenheit(double btusperhoursquarefootdegreefahrenheit) => new HeatTransferCoefficient(btusperhoursquarefootdegreefahrenheit, HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit);
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- [Obsolete("The name of this definition incorrectly omitted time as divisor, please use BtuPerHourSquareFootDegreeFahrenheit instead")]
- public static HeatTransferCoefficient FromBtusPerSquareFootDegreeFahrenheit(double btuspersquarefootdegreefahrenheit) => new HeatTransferCoefficient(btuspersquarefootdegreefahrenheit, HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit);
-
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatTransferCoefficient FromCaloriesPerHourSquareMeterDegreeCelsius(double caloriesperhoursquaremeterdegreecelsius) => new HeatTransferCoefficient(caloriesperhoursquaremeterdegreecelsius, HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatTransferCoefficient FromKilocaloriesPerHourSquareMeterDegreeCelsius(double kilocaloriesperhoursquaremeterdegreecelsius) => new HeatTransferCoefficient(kilocaloriesperhoursquaremeterdegreecelsius, HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatTransferCoefficient FromWattsPerSquareMeterCelsius(double wattspersquaremetercelsius) => new HeatTransferCoefficient(wattspersquaremetercelsius, HeatTransferCoefficientUnit.WattPerSquareMeterCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static HeatTransferCoefficient FromWattsPerSquareMeterKelvin(double wattspersquaremeterkelvin) => new HeatTransferCoefficient(wattspersquaremeterkelvin, HeatTransferCoefficientUnit.WattPerSquareMeterKelvin);
///
@@ -191,10 +172,9 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit => _value * 5.6782633411134878,
- HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit => _value * 5.6782633411134878,
- HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius => (_value * 4.1868) / 3600,
- HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius => ((_value * 4.1868) / 3600) * 1e3d,
+ HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit => _value * ((1055.05585262 / (0.3048 * 0.3048 * 3600)) * 1.8),
+ HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius => (_value * 4.184) / 3600,
+ HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius => ((_value * 4.184) / 3600) * 1e3d,
HeatTransferCoefficientUnit.WattPerSquareMeterCelsius => _value,
HeatTransferCoefficientUnit.WattPerSquareMeterKelvin => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -210,10 +190,9 @@ private double GetValueAs(HeatTransferCoefficientUnit unit)
return unit switch
{
- HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit => baseUnitValue / 5.6782633411134878,
- HeatTransferCoefficientUnit.BtuPerSquareFootDegreeFahrenheit => baseUnitValue / 5.6782633411134878,
- HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius => (baseUnitValue / 4.1868) * 3600,
- HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius => ((baseUnitValue / 4.1868) * 3600) / 1e3d,
+ HeatTransferCoefficientUnit.BtuPerHourSquareFootDegreeFahrenheit => baseUnitValue / ((1055.05585262 / (0.3048 * 0.3048 * 3600)) * 1.8),
+ HeatTransferCoefficientUnit.CaloriePerHourSquareMeterDegreeCelsius => (baseUnitValue / 4.184) * 3600,
+ HeatTransferCoefficientUnit.KilocaloriePerHourSquareMeterDegreeCelsius => ((baseUnitValue / 4.184) * 3600) / 1e3d,
HeatTransferCoefficientUnit.WattPerSquareMeterCelsius => baseUnitValue,
HeatTransferCoefficientUnit.WattPerSquareMeterKelvin => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Illuminance.g.cs
index 11dc710a91..540d6fa736 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Illuminance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Illuminance.g.cs
@@ -54,7 +54,6 @@ public struct Illuminance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Illuminance(double value, IlluminanceUnit unit)
{
_value = value;
@@ -109,25 +108,21 @@ public Illuminance(double value, IlluminanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Illuminance FromKilolux(double kilolux) => new Illuminance(kilolux, IlluminanceUnit.Kilolux);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Illuminance FromLux(double lux) => new Illuminance(lux, IlluminanceUnit.Lux);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Illuminance FromMegalux(double megalux) => new Illuminance(megalux, IlluminanceUnit.Megalux);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Illuminance FromMillilux(double millilux) => new Illuminance(millilux, IlluminanceUnit.Millilux);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Impulse.g.cs
index d363a32e1b..e2619d2a19 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Impulse.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Impulse.g.cs
@@ -51,7 +51,6 @@ public struct Impulse
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Impulse(double value, ImpulseUnit unit)
{
_value = value;
@@ -151,79 +150,66 @@ public Impulse(double value, ImpulseUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromCentinewtonSeconds(double centinewtonseconds) => new Impulse(centinewtonseconds, ImpulseUnit.CentinewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromDecanewtonSeconds(double decanewtonseconds) => new Impulse(decanewtonseconds, ImpulseUnit.DecanewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromDecinewtonSeconds(double decinewtonseconds) => new Impulse(decinewtonseconds, ImpulseUnit.DecinewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromKilogramMetersPerSecond(double kilogrammeterspersecond) => new Impulse(kilogrammeterspersecond, ImpulseUnit.KilogramMeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromKilonewtonSeconds(double kilonewtonseconds) => new Impulse(kilonewtonseconds, ImpulseUnit.KilonewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromMeganewtonSeconds(double meganewtonseconds) => new Impulse(meganewtonseconds, ImpulseUnit.MeganewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromMicronewtonSeconds(double micronewtonseconds) => new Impulse(micronewtonseconds, ImpulseUnit.MicronewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromMillinewtonSeconds(double millinewtonseconds) => new Impulse(millinewtonseconds, ImpulseUnit.MillinewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromNanonewtonSeconds(double nanonewtonseconds) => new Impulse(nanonewtonseconds, ImpulseUnit.NanonewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromNewtonSeconds(double newtonseconds) => new Impulse(newtonseconds, ImpulseUnit.NewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromPoundFeetPerSecond(double poundfeetpersecond) => new Impulse(poundfeetpersecond, ImpulseUnit.PoundFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromPoundForceSeconds(double poundforceseconds) => new Impulse(poundforceseconds, ImpulseUnit.PoundForceSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Impulse FromSlugFeetPerSecond(double slugfeetpersecond) => new Impulse(slugfeetpersecond, ImpulseUnit.SlugFootPerSecond);
///
@@ -276,9 +262,9 @@ private double GetValueInBaseUnit()
ImpulseUnit.MillinewtonSecond => (_value) * 1e-3d,
ImpulseUnit.NanonewtonSecond => (_value) * 1e-9d,
ImpulseUnit.NewtonSecond => _value,
- ImpulseUnit.PoundFootPerSecond => _value / 7.230657989877,
- ImpulseUnit.PoundForceSecond => _value / 0.2248089430997,
- ImpulseUnit.SlugFootPerSecond => _value / 0.224735720691,
+ ImpulseUnit.PoundFootPerSecond => _value * (0.45359237 * 0.3048),
+ ImpulseUnit.PoundForceSecond => _value * 0.45359237 * 9.80665,
+ ImpulseUnit.SlugFootPerSecond => _value * (0.45359237 * 9.80665),
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -302,9 +288,9 @@ private double GetValueAs(ImpulseUnit unit)
ImpulseUnit.MillinewtonSecond => (baseUnitValue) / 1e-3d,
ImpulseUnit.NanonewtonSecond => (baseUnitValue) / 1e-9d,
ImpulseUnit.NewtonSecond => baseUnitValue,
- ImpulseUnit.PoundFootPerSecond => baseUnitValue * 7.230657989877,
- ImpulseUnit.PoundForceSecond => baseUnitValue * 0.2248089430997,
- ImpulseUnit.SlugFootPerSecond => baseUnitValue * 0.224735720691,
+ ImpulseUnit.PoundFootPerSecond => baseUnitValue / (0.45359237 * 0.3048),
+ ImpulseUnit.PoundForceSecond => baseUnitValue / (0.45359237 * 9.80665),
+ ImpulseUnit.SlugFootPerSecond => baseUnitValue / (0.45359237 * 9.80665),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Information.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Information.g.cs
index e77bcdce10..16fc03f972 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Information.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Information.g.cs
@@ -51,7 +51,6 @@ public struct Information
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Information(double value, InformationUnit unit)
{
_value = value;
@@ -66,12 +65,12 @@ public Information(double value, InformationUnit unit)
///
/// Represents the largest possible value of Information.
///
- public static Information MaxValue { get; } = new Information(79228162514264337593543950335d, BaseUnit);
+ public static Information MaxValue { get; } = new Information(double.MaxValue, BaseUnit);
///
/// Represents the smallest possible value of Information.
///
- public static Information MinValue { get; } = new Information(-79228162514264337593543950335d, BaseUnit);
+ public static Information MinValue { get; } = new Information(double.MinValue, BaseUnit);
///
/// Gets an instance of this quantity with a value of 0 in the base unit Second.
@@ -216,157 +215,131 @@ public Information(double value, InformationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromBits(double bits) => new Information(bits, InformationUnit.Bit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromBytes(double bytes) => new Information(bytes, InformationUnit.Byte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromExabits(double exabits) => new Information(exabits, InformationUnit.Exabit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromExabytes(double exabytes) => new Information(exabytes, InformationUnit.Exabyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromExbibits(double exbibits) => new Information(exbibits, InformationUnit.Exbibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromExbibytes(double exbibytes) => new Information(exbibytes, InformationUnit.Exbibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromGibibits(double gibibits) => new Information(gibibits, InformationUnit.Gibibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromGibibytes(double gibibytes) => new Information(gibibytes, InformationUnit.Gibibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromGigabits(double gigabits) => new Information(gigabits, InformationUnit.Gigabit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromGigabytes(double gigabytes) => new Information(gigabytes, InformationUnit.Gigabyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromKibibits(double kibibits) => new Information(kibibits, InformationUnit.Kibibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromKibibytes(double kibibytes) => new Information(kibibytes, InformationUnit.Kibibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromKilobits(double kilobits) => new Information(kilobits, InformationUnit.Kilobit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromKilobytes(double kilobytes) => new Information(kilobytes, InformationUnit.Kilobyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromMebibits(double mebibits) => new Information(mebibits, InformationUnit.Mebibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromMebibytes(double mebibytes) => new Information(mebibytes, InformationUnit.Mebibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromMegabits(double megabits) => new Information(megabits, InformationUnit.Megabit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromMegabytes(double megabytes) => new Information(megabytes, InformationUnit.Megabyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromPebibits(double pebibits) => new Information(pebibits, InformationUnit.Pebibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromPebibytes(double pebibytes) => new Information(pebibytes, InformationUnit.Pebibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromPetabits(double petabits) => new Information(petabits, InformationUnit.Petabit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromPetabytes(double petabytes) => new Information(petabytes, InformationUnit.Petabyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromTebibits(double tebibits) => new Information(tebibits, InformationUnit.Tebibit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromTebibytes(double tebibytes) => new Information(tebibytes, InformationUnit.Tebibyte);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromTerabits(double terabits) => new Information(terabits, InformationUnit.Terabit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Information FromTerabytes(double terabytes) => new Information(terabytes, InformationUnit.Terabyte);
///
@@ -410,31 +383,31 @@ private double GetValueInBaseUnit()
return Unit switch
{
InformationUnit.Bit => _value,
- InformationUnit.Byte => _value * 8d,
+ InformationUnit.Byte => _value * 8,
InformationUnit.Exabit => (_value) * 1e18d,
- InformationUnit.Exabyte => (_value * 8d) * 1e18d,
+ InformationUnit.Exabyte => (_value * 8) * 1e18d,
InformationUnit.Exbibit => (_value) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
- InformationUnit.Exbibyte => (_value * 8d) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
+ InformationUnit.Exbibyte => (_value * 8) * (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
InformationUnit.Gibibit => (_value) * (1024d * 1024 * 1024),
- InformationUnit.Gibibyte => (_value * 8d) * (1024d * 1024 * 1024),
+ InformationUnit.Gibibyte => (_value * 8) * (1024d * 1024 * 1024),
InformationUnit.Gigabit => (_value) * 1e9d,
- InformationUnit.Gigabyte => (_value * 8d) * 1e9d,
+ InformationUnit.Gigabyte => (_value * 8) * 1e9d,
InformationUnit.Kibibit => (_value) * 1024d,
- InformationUnit.Kibibyte => (_value * 8d) * 1024d,
+ InformationUnit.Kibibyte => (_value * 8) * 1024d,
InformationUnit.Kilobit => (_value) * 1e3d,
- InformationUnit.Kilobyte => (_value * 8d) * 1e3d,
+ InformationUnit.Kilobyte => (_value * 8) * 1e3d,
InformationUnit.Mebibit => (_value) * (1024d * 1024),
- InformationUnit.Mebibyte => (_value * 8d) * (1024d * 1024),
+ InformationUnit.Mebibyte => (_value * 8) * (1024d * 1024),
InformationUnit.Megabit => (_value) * 1e6d,
- InformationUnit.Megabyte => (_value * 8d) * 1e6d,
+ InformationUnit.Megabyte => (_value * 8) * 1e6d,
InformationUnit.Pebibit => (_value) * (1024d * 1024 * 1024 * 1024 * 1024),
- InformationUnit.Pebibyte => (_value * 8d) * (1024d * 1024 * 1024 * 1024 * 1024),
+ InformationUnit.Pebibyte => (_value * 8) * (1024d * 1024 * 1024 * 1024 * 1024),
InformationUnit.Petabit => (_value) * 1e15d,
- InformationUnit.Petabyte => (_value * 8d) * 1e15d,
+ InformationUnit.Petabyte => (_value * 8) * 1e15d,
InformationUnit.Tebibit => (_value) * (1024d * 1024 * 1024 * 1024),
- InformationUnit.Tebibyte => (_value * 8d) * (1024d * 1024 * 1024 * 1024),
+ InformationUnit.Tebibyte => (_value * 8) * (1024d * 1024 * 1024 * 1024),
InformationUnit.Terabit => (_value) * 1e12d,
- InformationUnit.Terabyte => (_value * 8d) * 1e12d,
+ InformationUnit.Terabyte => (_value * 8) * 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -449,31 +422,31 @@ private double GetValueAs(InformationUnit unit)
return unit switch
{
InformationUnit.Bit => baseUnitValue,
- InformationUnit.Byte => baseUnitValue / 8d,
+ InformationUnit.Byte => baseUnitValue / 8,
InformationUnit.Exabit => (baseUnitValue) / 1e18d,
- InformationUnit.Exabyte => (baseUnitValue / 8d) / 1e18d,
+ InformationUnit.Exabyte => (baseUnitValue / 8) / 1e18d,
InformationUnit.Exbibit => (baseUnitValue) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
- InformationUnit.Exbibyte => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
+ InformationUnit.Exbibyte => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024 * 1024 * 1024),
InformationUnit.Gibibit => (baseUnitValue) / (1024d * 1024 * 1024),
- InformationUnit.Gibibyte => (baseUnitValue / 8d) / (1024d * 1024 * 1024),
+ InformationUnit.Gibibyte => (baseUnitValue / 8) / (1024d * 1024 * 1024),
InformationUnit.Gigabit => (baseUnitValue) / 1e9d,
- InformationUnit.Gigabyte => (baseUnitValue / 8d) / 1e9d,
+ InformationUnit.Gigabyte => (baseUnitValue / 8) / 1e9d,
InformationUnit.Kibibit => (baseUnitValue) / 1024d,
- InformationUnit.Kibibyte => (baseUnitValue / 8d) / 1024d,
+ InformationUnit.Kibibyte => (baseUnitValue / 8) / 1024d,
InformationUnit.Kilobit => (baseUnitValue) / 1e3d,
- InformationUnit.Kilobyte => (baseUnitValue / 8d) / 1e3d,
+ InformationUnit.Kilobyte => (baseUnitValue / 8) / 1e3d,
InformationUnit.Mebibit => (baseUnitValue) / (1024d * 1024),
- InformationUnit.Mebibyte => (baseUnitValue / 8d) / (1024d * 1024),
+ InformationUnit.Mebibyte => (baseUnitValue / 8) / (1024d * 1024),
InformationUnit.Megabit => (baseUnitValue) / 1e6d,
- InformationUnit.Megabyte => (baseUnitValue / 8d) / 1e6d,
+ InformationUnit.Megabyte => (baseUnitValue / 8) / 1e6d,
InformationUnit.Pebibit => (baseUnitValue) / (1024d * 1024 * 1024 * 1024 * 1024),
- InformationUnit.Pebibyte => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024 * 1024),
+ InformationUnit.Pebibyte => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024 * 1024),
InformationUnit.Petabit => (baseUnitValue) / 1e15d,
- InformationUnit.Petabyte => (baseUnitValue / 8d) / 1e15d,
+ InformationUnit.Petabyte => (baseUnitValue / 8) / 1e15d,
InformationUnit.Tebibit => (baseUnitValue) / (1024d * 1024 * 1024 * 1024),
- InformationUnit.Tebibyte => (baseUnitValue / 8d) / (1024d * 1024 * 1024 * 1024),
+ InformationUnit.Tebibyte => (baseUnitValue / 8) / (1024d * 1024 * 1024 * 1024),
InformationUnit.Terabit => (baseUnitValue) / 1e12d,
- InformationUnit.Terabyte => (baseUnitValue / 8d) / 1e12d,
+ InformationUnit.Terabyte => (baseUnitValue / 8) / 1e12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiance.g.cs
index 09d4379b40..2b77f93fd5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiance.g.cs
@@ -51,7 +51,6 @@ public struct Irradiance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Irradiance(double value, IrradianceUnit unit)
{
_value = value;
@@ -156,85 +155,71 @@ public Irradiance(double value, IrradianceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromKilowattsPerSquareCentimeter(double kilowattspersquarecentimeter) => new Irradiance(kilowattspersquarecentimeter, IrradianceUnit.KilowattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromKilowattsPerSquareMeter(double kilowattspersquaremeter) => new Irradiance(kilowattspersquaremeter, IrradianceUnit.KilowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMegawattsPerSquareCentimeter(double megawattspersquarecentimeter) => new Irradiance(megawattspersquarecentimeter, IrradianceUnit.MegawattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMegawattsPerSquareMeter(double megawattspersquaremeter) => new Irradiance(megawattspersquaremeter, IrradianceUnit.MegawattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMicrowattsPerSquareCentimeter(double microwattspersquarecentimeter) => new Irradiance(microwattspersquarecentimeter, IrradianceUnit.MicrowattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMicrowattsPerSquareMeter(double microwattspersquaremeter) => new Irradiance(microwattspersquaremeter, IrradianceUnit.MicrowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMilliwattsPerSquareCentimeter(double milliwattspersquarecentimeter) => new Irradiance(milliwattspersquarecentimeter, IrradianceUnit.MilliwattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromMilliwattsPerSquareMeter(double milliwattspersquaremeter) => new Irradiance(milliwattspersquaremeter, IrradianceUnit.MilliwattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromNanowattsPerSquareCentimeter(double nanowattspersquarecentimeter) => new Irradiance(nanowattspersquarecentimeter, IrradianceUnit.NanowattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromNanowattsPerSquareMeter(double nanowattspersquaremeter) => new Irradiance(nanowattspersquaremeter, IrradianceUnit.NanowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromPicowattsPerSquareCentimeter(double picowattspersquarecentimeter) => new Irradiance(picowattspersquarecentimeter, IrradianceUnit.PicowattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromPicowattsPerSquareMeter(double picowattspersquaremeter) => new Irradiance(picowattspersquaremeter, IrradianceUnit.PicowattPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromWattsPerSquareCentimeter(double wattspersquarecentimeter) => new Irradiance(wattspersquarecentimeter, IrradianceUnit.WattPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiance FromWattsPerSquareMeter(double wattspersquaremeter) => new Irradiance(wattspersquaremeter, IrradianceUnit.WattPerSquareMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs
index 6af6e0957a..6b1e5bafb4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs
@@ -54,7 +54,6 @@ public struct Irradiation
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Irradiation(double value, IrradiationUnit unit)
{
_value = value;
@@ -134,55 +133,46 @@ public Irradiation(double value, IrradiationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromBtusPerSquareFoot(double btuspersquarefoot) => new Irradiation(btuspersquarefoot, IrradiationUnit.BtuPerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromJoulesPerSquareCentimeter(double joulespersquarecentimeter) => new Irradiation(joulespersquarecentimeter, IrradiationUnit.JoulePerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromJoulesPerSquareMeter(double joulespersquaremeter) => new Irradiation(joulespersquaremeter, IrradiationUnit.JoulePerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromJoulesPerSquareMillimeter(double joulespersquaremillimeter) => new Irradiation(joulespersquaremillimeter, IrradiationUnit.JoulePerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromKilobtusPerSquareFoot(double kilobtuspersquarefoot) => new Irradiation(kilobtuspersquarefoot, IrradiationUnit.KilobtuPerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromKilojoulesPerSquareMeter(double kilojoulespersquaremeter) => new Irradiation(kilojoulespersquaremeter, IrradiationUnit.KilojoulePerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromKilowattHoursPerSquareMeter(double kilowatthourspersquaremeter) => new Irradiation(kilowatthourspersquaremeter, IrradiationUnit.KilowattHourPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromMillijoulesPerSquareCentimeter(double millijoulespersquarecentimeter) => new Irradiation(millijoulespersquarecentimeter, IrradiationUnit.MillijoulePerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Irradiation FromWattHoursPerSquareMeter(double watthourspersquaremeter) => new Irradiation(watthourspersquaremeter, IrradiationUnit.WattHourPerSquareMeter);
///
@@ -225,11 +215,11 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- IrradiationUnit.BtuPerSquareFoot => _value * (52752792631d / 4645152d),
+ IrradiationUnit.BtuPerSquareFoot => _value * 1055.05585262 / 9.290304e-2,
IrradiationUnit.JoulePerSquareCentimeter => _value * 1e4,
IrradiationUnit.JoulePerSquareMeter => _value,
IrradiationUnit.JoulePerSquareMillimeter => _value * 1e6,
- IrradiationUnit.KilobtuPerSquareFoot => (_value * (52752792631d / 4645152d)) * 1e3d,
+ IrradiationUnit.KilobtuPerSquareFoot => (_value * 1055.05585262 / 9.290304e-2) * 1e3d,
IrradiationUnit.KilojoulePerSquareMeter => (_value) * 1e3d,
IrradiationUnit.KilowattHourPerSquareMeter => (_value * 3600d) * 1e3d,
IrradiationUnit.MillijoulePerSquareCentimeter => (_value * 1e4) * 1e-3d,
@@ -247,11 +237,11 @@ private double GetValueAs(IrradiationUnit unit)
return unit switch
{
- IrradiationUnit.BtuPerSquareFoot => baseUnitValue / (52752792631d / 4645152d),
+ IrradiationUnit.BtuPerSquareFoot => baseUnitValue * 9.290304e-2 / 1055.05585262,
IrradiationUnit.JoulePerSquareCentimeter => baseUnitValue / 1e4,
IrradiationUnit.JoulePerSquareMeter => baseUnitValue,
IrradiationUnit.JoulePerSquareMillimeter => baseUnitValue / 1e6,
- IrradiationUnit.KilobtuPerSquareFoot => (baseUnitValue / (52752792631d / 4645152d)) / 1e3d,
+ IrradiationUnit.KilobtuPerSquareFoot => (baseUnitValue * 9.290304e-2 / 1055.05585262) / 1e3d,
IrradiationUnit.KilojoulePerSquareMeter => (baseUnitValue) / 1e3d,
IrradiationUnit.KilowattHourPerSquareMeter => (baseUnitValue / 3600d) / 1e3d,
IrradiationUnit.MillijoulePerSquareCentimeter => (baseUnitValue / 1e4) / 1e-3d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Jerk.g.cs
index 4428249aab..2e19d67718 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Jerk.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Jerk.g.cs
@@ -51,7 +51,6 @@ public struct Jerk
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Jerk(double value, JerkUnit unit)
{
_value = value;
@@ -141,67 +140,56 @@ public Jerk(double value, JerkUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromCentimetersPerSecondCubed(double centimeterspersecondcubed) => new Jerk(centimeterspersecondcubed, JerkUnit.CentimeterPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromDecimetersPerSecondCubed(double decimeterspersecondcubed) => new Jerk(decimeterspersecondcubed, JerkUnit.DecimeterPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromFeetPerSecondCubed(double feetpersecondcubed) => new Jerk(feetpersecondcubed, JerkUnit.FootPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromInchesPerSecondCubed(double inchespersecondcubed) => new Jerk(inchespersecondcubed, JerkUnit.InchPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromKilometersPerSecondCubed(double kilometerspersecondcubed) => new Jerk(kilometerspersecondcubed, JerkUnit.KilometerPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromMetersPerSecondCubed(double meterspersecondcubed) => new Jerk(meterspersecondcubed, JerkUnit.MeterPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromMicrometersPerSecondCubed(double micrometerspersecondcubed) => new Jerk(micrometerspersecondcubed, JerkUnit.MicrometerPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromMillimetersPerSecondCubed(double millimeterspersecondcubed) => new Jerk(millimeterspersecondcubed, JerkUnit.MillimeterPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromMillistandardGravitiesPerSecond(double millistandardgravitiespersecond) => new Jerk(millistandardgravitiespersecond, JerkUnit.MillistandardGravitiesPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromNanometersPerSecondCubed(double nanometerspersecondcubed) => new Jerk(nanometerspersecondcubed, JerkUnit.NanometerPerSecondCubed);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Jerk FromStandardGravitiesPerSecond(double standardgravitiespersecond) => new Jerk(standardgravitiespersecond, JerkUnit.StandardGravitiesPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/KinematicViscosity.g.cs
index 0b4c1fbe8f..98ac4c33f4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/KinematicViscosity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/KinematicViscosity.g.cs
@@ -54,7 +54,6 @@ public struct KinematicViscosity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public KinematicViscosity(double value, KinematicViscosityUnit unit)
{
_value = value;
@@ -134,55 +133,46 @@ public KinematicViscosity(double value, KinematicViscosityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromCentistokes(double centistokes) => new KinematicViscosity(centistokes, KinematicViscosityUnit.Centistokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromDecistokes(double decistokes) => new KinematicViscosity(decistokes, KinematicViscosityUnit.Decistokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromKilostokes(double kilostokes) => new KinematicViscosity(kilostokes, KinematicViscosityUnit.Kilostokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromMicrostokes(double microstokes) => new KinematicViscosity(microstokes, KinematicViscosityUnit.Microstokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromMillistokes(double millistokes) => new KinematicViscosity(millistokes, KinematicViscosityUnit.Millistokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromNanostokes(double nanostokes) => new KinematicViscosity(nanostokes, KinematicViscosityUnit.Nanostokes);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromSquareFeetPerSecond(double squarefeetpersecond) => new KinematicViscosity(squarefeetpersecond, KinematicViscosityUnit.SquareFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromSquareMetersPerSecond(double squaremeterspersecond) => new KinematicViscosity(squaremeterspersecond, KinematicViscosityUnit.SquareMeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static KinematicViscosity FromStokes(double stokes) => new KinematicViscosity(stokes, KinematicViscosityUnit.Stokes);
///
@@ -231,7 +221,7 @@ private double GetValueInBaseUnit()
KinematicViscosityUnit.Microstokes => (_value / 1e4) * 1e-6d,
KinematicViscosityUnit.Millistokes => (_value / 1e4) * 1e-3d,
KinematicViscosityUnit.Nanostokes => (_value / 1e4) * 1e-9d,
- KinematicViscosityUnit.SquareFootPerSecond => _value / 10.7639,
+ KinematicViscosityUnit.SquareFootPerSecond => _value * 9.290304e-2,
KinematicViscosityUnit.SquareMeterPerSecond => _value,
KinematicViscosityUnit.Stokes => _value / 1e4,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -253,7 +243,7 @@ private double GetValueAs(KinematicViscosityUnit unit)
KinematicViscosityUnit.Microstokes => (baseUnitValue * 1e4) / 1e-6d,
KinematicViscosityUnit.Millistokes => (baseUnitValue * 1e4) / 1e-3d,
KinematicViscosityUnit.Nanostokes => (baseUnitValue * 1e4) / 1e-9d,
- KinematicViscosityUnit.SquareFootPerSecond => baseUnitValue * 10.7639,
+ KinematicViscosityUnit.SquareFootPerSecond => baseUnitValue / 9.290304e-2,
KinematicViscosityUnit.SquareMeterPerSecond => baseUnitValue,
KinematicViscosityUnit.Stokes => baseUnitValue * 1e4,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LeakRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LeakRate.g.cs
index 40ce41437f..e24fb8af47 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LeakRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LeakRate.g.cs
@@ -54,7 +54,6 @@ public struct LeakRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public LeakRate(double value, LeakRateUnit unit)
{
_value = value;
@@ -104,19 +103,16 @@ public LeakRate(double value, LeakRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LeakRate FromMillibarLitersPerSecond(double millibarliterspersecond) => new LeakRate(millibarliterspersecond, LeakRateUnit.MillibarLiterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LeakRate FromPascalCubicMetersPerSecond(double pascalcubicmeterspersecond) => new LeakRate(pascalcubicmeterspersecond, LeakRateUnit.PascalCubicMeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LeakRate FromTorrLitersPerSecond(double torrliterspersecond) => new LeakRate(torrliterspersecond, LeakRateUnit.TorrLiterPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Length.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Length.g.cs
index b1747306b8..ad83dad1c4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Length.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Length.g.cs
@@ -51,7 +51,6 @@ public struct Length
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Length(double value, LengthUnit unit)
{
_value = value;
@@ -296,253 +295,211 @@ public Length(double value, LengthUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromAngstroms(double angstroms) => new Length(angstroms, LengthUnit.Angstrom);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromAstronomicalUnits(double astronomicalunits) => new Length(astronomicalunits, LengthUnit.AstronomicalUnit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromCentimeters(double centimeters) => new Length(centimeters, LengthUnit.Centimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromChains(double chains) => new Length(chains, LengthUnit.Chain);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromDataMiles(double datamiles) => new Length(datamiles, LengthUnit.DataMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromDecameters(double decameters) => new Length(decameters, LengthUnit.Decameter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromDecimeters(double decimeters) => new Length(decimeters, LengthUnit.Decimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromDtpPicas(double dtppicas) => new Length(dtppicas, LengthUnit.DtpPica);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromDtpPoints(double dtppoints) => new Length(dtppoints, LengthUnit.DtpPoint);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromFathoms(double fathoms) => new Length(fathoms, LengthUnit.Fathom);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromFemtometers(double femtometers) => new Length(femtometers, LengthUnit.Femtometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromFeet(double feet) => new Length(feet, LengthUnit.Foot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromGigameters(double gigameters) => new Length(gigameters, LengthUnit.Gigameter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromHands(double hands) => new Length(hands, LengthUnit.Hand);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromHectometers(double hectometers) => new Length(hectometers, LengthUnit.Hectometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromInches(double inches) => new Length(inches, LengthUnit.Inch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromKilofeet(double kilofeet) => new Length(kilofeet, LengthUnit.Kilofoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromKilolightYears(double kilolightyears) => new Length(kilolightyears, LengthUnit.KilolightYear);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromKilometers(double kilometers) => new Length(kilometers, LengthUnit.Kilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromKiloparsecs(double kiloparsecs) => new Length(kiloparsecs, LengthUnit.Kiloparsec);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromKiloyards(double kiloyards) => new Length(kiloyards, LengthUnit.Kiloyard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromLightYears(double lightyears) => new Length(lightyears, LengthUnit.LightYear);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMegalightYears(double megalightyears) => new Length(megalightyears, LengthUnit.MegalightYear);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMegameters(double megameters) => new Length(megameters, LengthUnit.Megameter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMegaparsecs(double megaparsecs) => new Length(megaparsecs, LengthUnit.Megaparsec);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMeters(double meters) => new Length(meters, LengthUnit.Meter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMicroinches(double microinches) => new Length(microinches, LengthUnit.Microinch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMicrometers(double micrometers) => new Length(micrometers, LengthUnit.Micrometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMils(double mils) => new Length(mils, LengthUnit.Mil);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMiles(double miles) => new Length(miles, LengthUnit.Mile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromMillimeters(double millimeters) => new Length(millimeters, LengthUnit.Millimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromNanometers(double nanometers) => new Length(nanometers, LengthUnit.Nanometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromNauticalMiles(double nauticalmiles) => new Length(nauticalmiles, LengthUnit.NauticalMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromParsecs(double parsecs) => new Length(parsecs, LengthUnit.Parsec);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromPicometers(double picometers) => new Length(picometers, LengthUnit.Picometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromPrinterPicas(double printerpicas) => new Length(printerpicas, LengthUnit.PrinterPica);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromPrinterPoints(double printerpoints) => new Length(printerpoints, LengthUnit.PrinterPoint);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromShackles(double shackles) => new Length(shackles, LengthUnit.Shackle);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromSolarRadiuses(double solarradiuses) => new Length(solarradiuses, LengthUnit.SolarRadius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromTwips(double twips) => new Length(twips, LengthUnit.Twip);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromUsSurveyFeet(double ussurveyfeet) => new Length(ussurveyfeet, LengthUnit.UsSurveyFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Length FromYards(double yards) => new Length(yards, LengthUnit.Yard);
///
@@ -592,8 +549,8 @@ private double GetValueInBaseUnit()
LengthUnit.DataMile => _value * 1828.8,
LengthUnit.Decameter => (_value) * 1e1d,
LengthUnit.Decimeter => (_value) * 1e-1d,
- LengthUnit.DtpPica => _value / 236.220472441,
- LengthUnit.DtpPoint => (_value / 72) * 2.54e-2,
+ LengthUnit.DtpPica => _value * 2.54e-2 / 6,
+ LengthUnit.DtpPoint => _value * 2.54e-2 / 72,
LengthUnit.Fathom => _value * 1.8288,
LengthUnit.Femtometer => (_value) * 1e-15d,
LengthUnit.Foot => _value * 0.3048,
@@ -620,11 +577,11 @@ private double GetValueInBaseUnit()
LengthUnit.NauticalMile => _value * 1852,
LengthUnit.Parsec => _value * 3.08567758128e16,
LengthUnit.Picometer => (_value) * 1e-12d,
- LengthUnit.PrinterPica => _value / 237.106301584,
- LengthUnit.PrinterPoint => (_value / 72.27) * 2.54e-2,
+ LengthUnit.PrinterPica => _value * 2.54e-2 * 400 / 2409,
+ LengthUnit.PrinterPoint => _value * 2.54e-2 / 72.27 ,
LengthUnit.Shackle => _value * 27.432,
LengthUnit.SolarRadius => _value * 6.95700e8,
- LengthUnit.Twip => _value / 56692.913385826,
+ LengthUnit.Twip => _value * 2.54e-2 / 1440,
LengthUnit.UsSurveyFoot => _value * 1200 / 3937,
LengthUnit.Yard => _value * 0.9144,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -647,8 +604,8 @@ private double GetValueAs(LengthUnit unit)
LengthUnit.DataMile => baseUnitValue / 1828.8,
LengthUnit.Decameter => (baseUnitValue) / 1e1d,
LengthUnit.Decimeter => (baseUnitValue) / 1e-1d,
- LengthUnit.DtpPica => baseUnitValue * 236.220472441,
- LengthUnit.DtpPoint => (baseUnitValue / 2.54e-2) * 72,
+ LengthUnit.DtpPica => baseUnitValue * 6 / 2.54e-2,
+ LengthUnit.DtpPoint => baseUnitValue * 72 / 2.54e-2,
LengthUnit.Fathom => baseUnitValue / 1.8288,
LengthUnit.Femtometer => (baseUnitValue) / 1e-15d,
LengthUnit.Foot => baseUnitValue / 0.3048,
@@ -675,11 +632,11 @@ private double GetValueAs(LengthUnit unit)
LengthUnit.NauticalMile => baseUnitValue / 1852,
LengthUnit.Parsec => baseUnitValue / 3.08567758128e16,
LengthUnit.Picometer => (baseUnitValue) / 1e-12d,
- LengthUnit.PrinterPica => baseUnitValue * 237.106301584,
- LengthUnit.PrinterPoint => (baseUnitValue / 2.54e-2) * 72.27,
+ LengthUnit.PrinterPica => baseUnitValue / (2.54e-2 * 400 / 2409),
+ LengthUnit.PrinterPoint => baseUnitValue * 72.27 / 2.54e-2,
LengthUnit.Shackle => baseUnitValue / 27.432,
LengthUnit.SolarRadius => baseUnitValue / 6.95700e8,
- LengthUnit.Twip => baseUnitValue * 56692.913385826,
+ LengthUnit.Twip => baseUnitValue * 1440 / 2.54e-2,
LengthUnit.UsSurveyFoot => baseUnitValue * 3937 / 1200,
LengthUnit.Yard => baseUnitValue / 0.9144,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Level.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Level.g.cs
index 372eecfe26..8af03d733a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Level.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Level.g.cs
@@ -51,7 +51,6 @@ public struct Level
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Level(double value, LevelUnit unit)
{
_value = value;
@@ -96,13 +95,11 @@ public Level(double value, LevelUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Level FromDecibels(double decibels) => new Level(decibels, LevelUnit.Decibel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Level FromNepers(double nepers) => new Level(nepers, LevelUnit.Neper);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearDensity.g.cs
index 90a6c4ae1f..91011ce626 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearDensity.g.cs
@@ -54,7 +54,6 @@ public struct LinearDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public LinearDensity(double value, LinearDensityUnit unit)
{
_value = value;
@@ -179,109 +178,91 @@ public LinearDensity(double value, LinearDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromGramsPerCentimeter(double gramspercentimeter) => new LinearDensity(gramspercentimeter, LinearDensityUnit.GramPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromGramsPerFoot(double gramsperfoot) => new LinearDensity(gramsperfoot, LinearDensityUnit.GramPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromGramsPerMeter(double gramspermeter) => new LinearDensity(gramspermeter, LinearDensityUnit.GramPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromGramsPerMillimeter(double gramspermillimeter) => new LinearDensity(gramspermillimeter, LinearDensityUnit.GramPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromKilogramsPerCentimeter(double kilogramspercentimeter) => new LinearDensity(kilogramspercentimeter, LinearDensityUnit.KilogramPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromKilogramsPerFoot(double kilogramsperfoot) => new LinearDensity(kilogramsperfoot, LinearDensityUnit.KilogramPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromKilogramsPerMeter(double kilogramspermeter) => new LinearDensity(kilogramspermeter, LinearDensityUnit.KilogramPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromKilogramsPerMillimeter(double kilogramspermillimeter) => new LinearDensity(kilogramspermillimeter, LinearDensityUnit.KilogramPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMicrogramsPerCentimeter(double microgramspercentimeter) => new LinearDensity(microgramspercentimeter, LinearDensityUnit.MicrogramPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMicrogramsPerFoot(double microgramsperfoot) => new LinearDensity(microgramsperfoot, LinearDensityUnit.MicrogramPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMicrogramsPerMeter(double microgramspermeter) => new LinearDensity(microgramspermeter, LinearDensityUnit.MicrogramPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMicrogramsPerMillimeter(double microgramspermillimeter) => new LinearDensity(microgramspermillimeter, LinearDensityUnit.MicrogramPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMilligramsPerCentimeter(double milligramspercentimeter) => new LinearDensity(milligramspercentimeter, LinearDensityUnit.MilligramPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMilligramsPerFoot(double milligramsperfoot) => new LinearDensity(milligramsperfoot, LinearDensityUnit.MilligramPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMilligramsPerMeter(double milligramspermeter) => new LinearDensity(milligramspermeter, LinearDensityUnit.MilligramPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromMilligramsPerMillimeter(double milligramspermillimeter) => new LinearDensity(milligramspermillimeter, LinearDensityUnit.MilligramPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromPoundsPerFoot(double poundsperfoot) => new LinearDensity(poundsperfoot, LinearDensityUnit.PoundPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearDensity FromPoundsPerInch(double poundsperinch) => new LinearDensity(poundsperinch, LinearDensityUnit.PoundPerInch);
///
@@ -340,8 +321,8 @@ private double GetValueInBaseUnit()
LinearDensityUnit.MilligramPerFoot => (_value * ( 1e-3 / 0.3048 )) * 1e-3d,
LinearDensityUnit.MilligramPerMeter => (_value * 1e-3) * 1e-3d,
LinearDensityUnit.MilligramPerMillimeter => (_value) * 1e-3d,
- LinearDensityUnit.PoundPerFoot => _value * 1.48816394,
- LinearDensityUnit.PoundPerInch => _value / 5.5997415e-2,
+ LinearDensityUnit.PoundPerFoot => _value * 0.45359237 / 0.3048,
+ LinearDensityUnit.PoundPerInch => _value * 0.45359237 / 2.54e-2,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -371,8 +352,8 @@ private double GetValueAs(LinearDensityUnit unit)
LinearDensityUnit.MilligramPerFoot => (baseUnitValue / ( 1e-3 / 0.3048 )) / 1e-3d,
LinearDensityUnit.MilligramPerMeter => (baseUnitValue / 1e-3) / 1e-3d,
LinearDensityUnit.MilligramPerMillimeter => (baseUnitValue) / 1e-3d,
- LinearDensityUnit.PoundPerFoot => baseUnitValue / 1.48816394,
- LinearDensityUnit.PoundPerInch => baseUnitValue * 5.5997415e-2,
+ LinearDensityUnit.PoundPerFoot => baseUnitValue * 0.3048 / 0.45359237,
+ LinearDensityUnit.PoundPerInch => baseUnitValue * 2.54e-2 / 0.45359237,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearPowerDensity.g.cs
index a354a93a60..c1865ad45d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearPowerDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LinearPowerDensity.g.cs
@@ -54,7 +54,6 @@ public struct LinearPowerDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public LinearPowerDensity(double value, LinearPowerDensityUnit unit)
{
_value = value;
@@ -214,151 +213,126 @@ public LinearPowerDensity(double value, LinearPowerDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromGigawattsPerCentimeter(double gigawattspercentimeter) => new LinearPowerDensity(gigawattspercentimeter, LinearPowerDensityUnit.GigawattPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromGigawattsPerFoot(double gigawattsperfoot) => new LinearPowerDensity(gigawattsperfoot, LinearPowerDensityUnit.GigawattPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromGigawattsPerInch(double gigawattsperinch) => new LinearPowerDensity(gigawattsperinch, LinearPowerDensityUnit.GigawattPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromGigawattsPerMeter(double gigawattspermeter) => new LinearPowerDensity(gigawattspermeter, LinearPowerDensityUnit.GigawattPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromGigawattsPerMillimeter(double gigawattspermillimeter) => new LinearPowerDensity(gigawattspermillimeter, LinearPowerDensityUnit.GigawattPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromKilowattsPerCentimeter(double kilowattspercentimeter) => new LinearPowerDensity(kilowattspercentimeter, LinearPowerDensityUnit.KilowattPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromKilowattsPerFoot(double kilowattsperfoot) => new LinearPowerDensity(kilowattsperfoot, LinearPowerDensityUnit.KilowattPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromKilowattsPerInch(double kilowattsperinch) => new LinearPowerDensity(kilowattsperinch, LinearPowerDensityUnit.KilowattPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromKilowattsPerMeter(double kilowattspermeter) => new LinearPowerDensity(kilowattspermeter, LinearPowerDensityUnit.KilowattPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromKilowattsPerMillimeter(double kilowattspermillimeter) => new LinearPowerDensity(kilowattspermillimeter, LinearPowerDensityUnit.KilowattPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMegawattsPerCentimeter(double megawattspercentimeter) => new LinearPowerDensity(megawattspercentimeter, LinearPowerDensityUnit.MegawattPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMegawattsPerFoot(double megawattsperfoot) => new LinearPowerDensity(megawattsperfoot, LinearPowerDensityUnit.MegawattPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMegawattsPerInch(double megawattsperinch) => new LinearPowerDensity(megawattsperinch, LinearPowerDensityUnit.MegawattPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMegawattsPerMeter(double megawattspermeter) => new LinearPowerDensity(megawattspermeter, LinearPowerDensityUnit.MegawattPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMegawattsPerMillimeter(double megawattspermillimeter) => new LinearPowerDensity(megawattspermillimeter, LinearPowerDensityUnit.MegawattPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMilliwattsPerCentimeter(double milliwattspercentimeter) => new LinearPowerDensity(milliwattspercentimeter, LinearPowerDensityUnit.MilliwattPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMilliwattsPerFoot(double milliwattsperfoot) => new LinearPowerDensity(milliwattsperfoot, LinearPowerDensityUnit.MilliwattPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMilliwattsPerInch(double milliwattsperinch) => new LinearPowerDensity(milliwattsperinch, LinearPowerDensityUnit.MilliwattPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMilliwattsPerMeter(double milliwattspermeter) => new LinearPowerDensity(milliwattspermeter, LinearPowerDensityUnit.MilliwattPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromMilliwattsPerMillimeter(double milliwattspermillimeter) => new LinearPowerDensity(milliwattspermillimeter, LinearPowerDensityUnit.MilliwattPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromWattsPerCentimeter(double wattspercentimeter) => new LinearPowerDensity(wattspercentimeter, LinearPowerDensityUnit.WattPerCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromWattsPerFoot(double wattsperfoot) => new LinearPowerDensity(wattsperfoot, LinearPowerDensityUnit.WattPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromWattsPerInch(double wattsperinch) => new LinearPowerDensity(wattsperinch, LinearPowerDensityUnit.WattPerInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromWattsPerMeter(double wattspermeter) => new LinearPowerDensity(wattspermeter, LinearPowerDensityUnit.WattPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LinearPowerDensity FromWattsPerMillimeter(double wattspermillimeter) => new LinearPowerDensity(wattspermillimeter, LinearPowerDensityUnit.WattPerMillimeter);
///
@@ -402,28 +376,28 @@ private double GetValueInBaseUnit()
return Unit switch
{
LinearPowerDensityUnit.GigawattPerCentimeter => (_value * 1e2) * 1e9d,
- LinearPowerDensityUnit.GigawattPerFoot => (_value * 3.280839895) * 1e9d,
- LinearPowerDensityUnit.GigawattPerInch => (_value * 39.37007874) * 1e9d,
+ LinearPowerDensityUnit.GigawattPerFoot => (_value / 0.3048) * 1e9d,
+ LinearPowerDensityUnit.GigawattPerInch => (_value / 2.54e-2) * 1e9d,
LinearPowerDensityUnit.GigawattPerMeter => (_value) * 1e9d,
LinearPowerDensityUnit.GigawattPerMillimeter => (_value * 1e3) * 1e9d,
LinearPowerDensityUnit.KilowattPerCentimeter => (_value * 1e2) * 1e3d,
- LinearPowerDensityUnit.KilowattPerFoot => (_value * 3.280839895) * 1e3d,
- LinearPowerDensityUnit.KilowattPerInch => (_value * 39.37007874) * 1e3d,
+ LinearPowerDensityUnit.KilowattPerFoot => (_value / 0.3048) * 1e3d,
+ LinearPowerDensityUnit.KilowattPerInch => (_value / 2.54e-2) * 1e3d,
LinearPowerDensityUnit.KilowattPerMeter => (_value) * 1e3d,
LinearPowerDensityUnit.KilowattPerMillimeter => (_value * 1e3) * 1e3d,
LinearPowerDensityUnit.MegawattPerCentimeter => (_value * 1e2) * 1e6d,
- LinearPowerDensityUnit.MegawattPerFoot => (_value * 3.280839895) * 1e6d,
- LinearPowerDensityUnit.MegawattPerInch => (_value * 39.37007874) * 1e6d,
+ LinearPowerDensityUnit.MegawattPerFoot => (_value / 0.3048) * 1e6d,
+ LinearPowerDensityUnit.MegawattPerInch => (_value / 2.54e-2) * 1e6d,
LinearPowerDensityUnit.MegawattPerMeter => (_value) * 1e6d,
LinearPowerDensityUnit.MegawattPerMillimeter => (_value * 1e3) * 1e6d,
LinearPowerDensityUnit.MilliwattPerCentimeter => (_value * 1e2) * 1e-3d,
- LinearPowerDensityUnit.MilliwattPerFoot => (_value * 3.280839895) * 1e-3d,
- LinearPowerDensityUnit.MilliwattPerInch => (_value * 39.37007874) * 1e-3d,
+ LinearPowerDensityUnit.MilliwattPerFoot => (_value / 0.3048) * 1e-3d,
+ LinearPowerDensityUnit.MilliwattPerInch => (_value / 2.54e-2) * 1e-3d,
LinearPowerDensityUnit.MilliwattPerMeter => (_value) * 1e-3d,
LinearPowerDensityUnit.MilliwattPerMillimeter => (_value * 1e3) * 1e-3d,
LinearPowerDensityUnit.WattPerCentimeter => _value * 1e2,
- LinearPowerDensityUnit.WattPerFoot => _value * 3.280839895,
- LinearPowerDensityUnit.WattPerInch => _value * 39.37007874,
+ LinearPowerDensityUnit.WattPerFoot => _value / 0.3048,
+ LinearPowerDensityUnit.WattPerInch => _value / 2.54e-2,
LinearPowerDensityUnit.WattPerMeter => _value,
LinearPowerDensityUnit.WattPerMillimeter => _value * 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -440,28 +414,28 @@ private double GetValueAs(LinearPowerDensityUnit unit)
return unit switch
{
LinearPowerDensityUnit.GigawattPerCentimeter => (baseUnitValue / 1e2) / 1e9d,
- LinearPowerDensityUnit.GigawattPerFoot => (baseUnitValue / 3.280839895) / 1e9d,
- LinearPowerDensityUnit.GigawattPerInch => (baseUnitValue / 39.37007874) / 1e9d,
+ LinearPowerDensityUnit.GigawattPerFoot => (baseUnitValue * 0.3048) / 1e9d,
+ LinearPowerDensityUnit.GigawattPerInch => (baseUnitValue * 2.54e-2) / 1e9d,
LinearPowerDensityUnit.GigawattPerMeter => (baseUnitValue) / 1e9d,
LinearPowerDensityUnit.GigawattPerMillimeter => (baseUnitValue / 1e3) / 1e9d,
LinearPowerDensityUnit.KilowattPerCentimeter => (baseUnitValue / 1e2) / 1e3d,
- LinearPowerDensityUnit.KilowattPerFoot => (baseUnitValue / 3.280839895) / 1e3d,
- LinearPowerDensityUnit.KilowattPerInch => (baseUnitValue / 39.37007874) / 1e3d,
+ LinearPowerDensityUnit.KilowattPerFoot => (baseUnitValue * 0.3048) / 1e3d,
+ LinearPowerDensityUnit.KilowattPerInch => (baseUnitValue * 2.54e-2) / 1e3d,
LinearPowerDensityUnit.KilowattPerMeter => (baseUnitValue) / 1e3d,
LinearPowerDensityUnit.KilowattPerMillimeter => (baseUnitValue / 1e3) / 1e3d,
LinearPowerDensityUnit.MegawattPerCentimeter => (baseUnitValue / 1e2) / 1e6d,
- LinearPowerDensityUnit.MegawattPerFoot => (baseUnitValue / 3.280839895) / 1e6d,
- LinearPowerDensityUnit.MegawattPerInch => (baseUnitValue / 39.37007874) / 1e6d,
+ LinearPowerDensityUnit.MegawattPerFoot => (baseUnitValue * 0.3048) / 1e6d,
+ LinearPowerDensityUnit.MegawattPerInch => (baseUnitValue * 2.54e-2) / 1e6d,
LinearPowerDensityUnit.MegawattPerMeter => (baseUnitValue) / 1e6d,
LinearPowerDensityUnit.MegawattPerMillimeter => (baseUnitValue / 1e3) / 1e6d,
LinearPowerDensityUnit.MilliwattPerCentimeter => (baseUnitValue / 1e2) / 1e-3d,
- LinearPowerDensityUnit.MilliwattPerFoot => (baseUnitValue / 3.280839895) / 1e-3d,
- LinearPowerDensityUnit.MilliwattPerInch => (baseUnitValue / 39.37007874) / 1e-3d,
+ LinearPowerDensityUnit.MilliwattPerFoot => (baseUnitValue * 0.3048) / 1e-3d,
+ LinearPowerDensityUnit.MilliwattPerInch => (baseUnitValue * 2.54e-2) / 1e-3d,
LinearPowerDensityUnit.MilliwattPerMeter => (baseUnitValue) / 1e-3d,
LinearPowerDensityUnit.MilliwattPerMillimeter => (baseUnitValue / 1e3) / 1e-3d,
LinearPowerDensityUnit.WattPerCentimeter => baseUnitValue / 1e2,
- LinearPowerDensityUnit.WattPerFoot => baseUnitValue / 3.280839895,
- LinearPowerDensityUnit.WattPerInch => baseUnitValue / 39.37007874,
+ LinearPowerDensityUnit.WattPerFoot => baseUnitValue * 0.3048,
+ LinearPowerDensityUnit.WattPerInch => baseUnitValue * 2.54e-2,
LinearPowerDensityUnit.WattPerMeter => baseUnitValue,
LinearPowerDensityUnit.WattPerMillimeter => baseUnitValue / 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminance.g.cs
index 30b3886f8a..6049823be3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminance.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminance.g.cs
@@ -54,7 +54,6 @@ public struct Luminance
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Luminance(double value, LuminanceUnit unit)
{
_value = value;
@@ -139,61 +138,51 @@ public Luminance(double value, LuminanceUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromCandelasPerSquareFoot(double candelaspersquarefoot) => new Luminance(candelaspersquarefoot, LuminanceUnit.CandelaPerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromCandelasPerSquareInch(double candelaspersquareinch) => new Luminance(candelaspersquareinch, LuminanceUnit.CandelaPerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromCandelasPerSquareMeter(double candelaspersquaremeter) => new Luminance(candelaspersquaremeter, LuminanceUnit.CandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromCenticandelasPerSquareMeter(double centicandelaspersquaremeter) => new Luminance(centicandelaspersquaremeter, LuminanceUnit.CenticandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromDecicandelasPerSquareMeter(double decicandelaspersquaremeter) => new Luminance(decicandelaspersquaremeter, LuminanceUnit.DecicandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromKilocandelasPerSquareMeter(double kilocandelaspersquaremeter) => new Luminance(kilocandelaspersquaremeter, LuminanceUnit.KilocandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromMicrocandelasPerSquareMeter(double microcandelaspersquaremeter) => new Luminance(microcandelaspersquaremeter, LuminanceUnit.MicrocandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromMillicandelasPerSquareMeter(double millicandelaspersquaremeter) => new Luminance(millicandelaspersquaremeter, LuminanceUnit.MillicandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromNanocandelasPerSquareMeter(double nanocandelaspersquaremeter) => new Luminance(nanocandelaspersquaremeter, LuminanceUnit.NanocandelaPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminance FromNits(double nits) => new Luminance(nits, LuminanceUnit.Nit);
///
@@ -236,8 +225,8 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- LuminanceUnit.CandelaPerSquareFoot => _value* 1.07639e1,
- LuminanceUnit.CandelaPerSquareInch => _value* 1.5500031e3,
+ LuminanceUnit.CandelaPerSquareFoot => _value / 9.290304e-2,
+ LuminanceUnit.CandelaPerSquareInch => _value / 0.00064516,
LuminanceUnit.CandelaPerSquareMeter => _value,
LuminanceUnit.CenticandelaPerSquareMeter => (_value) * 1e-2d,
LuminanceUnit.DecicandelaPerSquareMeter => (_value) * 1e-1d,
@@ -259,8 +248,8 @@ private double GetValueAs(LuminanceUnit unit)
return unit switch
{
- LuminanceUnit.CandelaPerSquareFoot => baseUnitValue/ 1.07639e1,
- LuminanceUnit.CandelaPerSquareInch => baseUnitValue/ 1.5500031e3,
+ LuminanceUnit.CandelaPerSquareFoot => baseUnitValue * 9.290304e-2,
+ LuminanceUnit.CandelaPerSquareInch => baseUnitValue * 0.00064516,
LuminanceUnit.CandelaPerSquareMeter => baseUnitValue,
LuminanceUnit.CenticandelaPerSquareMeter => (baseUnitValue) / 1e-2d,
LuminanceUnit.DecicandelaPerSquareMeter => (baseUnitValue) / 1e-1d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminosity.g.cs
index 4eb4cd9e68..1ddfd277f9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminosity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Luminosity.g.cs
@@ -54,7 +54,6 @@ public struct Luminosity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Luminosity(double value, LuminosityUnit unit)
{
_value = value;
@@ -159,85 +158,71 @@ public Luminosity(double value, LuminosityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromDecawatts(double decawatts) => new Luminosity(decawatts, LuminosityUnit.Decawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromDeciwatts(double deciwatts) => new Luminosity(deciwatts, LuminosityUnit.Deciwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromFemtowatts(double femtowatts) => new Luminosity(femtowatts, LuminosityUnit.Femtowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromGigawatts(double gigawatts) => new Luminosity(gigawatts, LuminosityUnit.Gigawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromKilowatts(double kilowatts) => new Luminosity(kilowatts, LuminosityUnit.Kilowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromMegawatts(double megawatts) => new Luminosity(megawatts, LuminosityUnit.Megawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromMicrowatts(double microwatts) => new Luminosity(microwatts, LuminosityUnit.Microwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromMilliwatts(double milliwatts) => new Luminosity(milliwatts, LuminosityUnit.Milliwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromNanowatts(double nanowatts) => new Luminosity(nanowatts, LuminosityUnit.Nanowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromPetawatts(double petawatts) => new Luminosity(petawatts, LuminosityUnit.Petawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromPicowatts(double picowatts) => new Luminosity(picowatts, LuminosityUnit.Picowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromSolarLuminosities(double solarluminosities) => new Luminosity(solarluminosities, LuminosityUnit.SolarLuminosity);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromTerawatts(double terawatts) => new Luminosity(terawatts, LuminosityUnit.Terawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Luminosity FromWatts(double watts) => new Luminosity(watts, LuminosityUnit.Watt);
///
@@ -291,7 +276,7 @@ private double GetValueInBaseUnit()
LuminosityUnit.Nanowatt => (_value) * 1e-9d,
LuminosityUnit.Petawatt => (_value) * 1e15d,
LuminosityUnit.Picowatt => (_value) * 1e-12d,
- LuminosityUnit.SolarLuminosity => _value * 3.846e26,
+ LuminosityUnit.SolarLuminosity => _value * 3.828e26,
LuminosityUnit.Terawatt => (_value) * 1e12d,
LuminosityUnit.Watt => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -318,7 +303,7 @@ private double GetValueAs(LuminosityUnit unit)
LuminosityUnit.Nanowatt => (baseUnitValue) / 1e-9d,
LuminosityUnit.Petawatt => (baseUnitValue) / 1e15d,
LuminosityUnit.Picowatt => (baseUnitValue) / 1e-12d,
- LuminosityUnit.SolarLuminosity => baseUnitValue / 3.846e26,
+ LuminosityUnit.SolarLuminosity => baseUnitValue / 3.828e26,
LuminosityUnit.Terawatt => (baseUnitValue) / 1e12d,
LuminosityUnit.Watt => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousFlux.g.cs
index 9ace5187d7..f308260ae0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousFlux.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousFlux.g.cs
@@ -54,7 +54,6 @@ public struct LuminousFlux
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public LuminousFlux(double value, LuminousFluxUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public LuminousFlux(double value, LuminousFluxUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LuminousFlux FromLumens(double lumens) => new LuminousFlux(lumens, LuminousFluxUnit.Lumen);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousIntensity.g.cs
index f2084af87a..168a8ce0bd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousIntensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/LuminousIntensity.g.cs
@@ -54,7 +54,6 @@ public struct LuminousIntensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public LuminousIntensity(double value, LuminousIntensityUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public LuminousIntensity(double value, LuminousIntensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static LuminousIntensity FromCandela(double candela) => new LuminousIntensity(candela, LuminousIntensityUnit.Candela);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticField.g.cs
index 3de2a5f51c..b0218c3d00 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticField.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticField.g.cs
@@ -54,7 +54,6 @@ public struct MagneticField
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MagneticField(double value, MagneticFieldUnit unit)
{
_value = value;
@@ -119,37 +118,31 @@ public MagneticField(double value, MagneticFieldUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromGausses(double gausses) => new MagneticField(gausses, MagneticFieldUnit.Gauss);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromMicroteslas(double microteslas) => new MagneticField(microteslas, MagneticFieldUnit.Microtesla);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromMilligausses(double milligausses) => new MagneticField(milligausses, MagneticFieldUnit.Milligauss);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromMilliteslas(double milliteslas) => new MagneticField(milliteslas, MagneticFieldUnit.Millitesla);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromNanoteslas(double nanoteslas) => new MagneticField(nanoteslas, MagneticFieldUnit.Nanotesla);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticField FromTeslas(double teslas) => new MagneticField(teslas, MagneticFieldUnit.Tesla);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticFlux.g.cs
index 9c4f969a9e..d253451bd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticFlux.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MagneticFlux.g.cs
@@ -54,7 +54,6 @@ public struct MagneticFlux
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MagneticFlux(double value, MagneticFluxUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public MagneticFlux(double value, MagneticFluxUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MagneticFlux FromWebers(double webers) => new MagneticFlux(webers, MagneticFluxUnit.Weber);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Magnetization.g.cs
index 253d6421ac..44afe6bce2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Magnetization.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Magnetization.g.cs
@@ -54,7 +54,6 @@ public struct Magnetization
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Magnetization(double value, MagnetizationUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public Magnetization(double value, MagnetizationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Magnetization FromAmperesPerMeter(double amperespermeter) => new Magnetization(amperespermeter, MagnetizationUnit.AmperePerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Mass.g.cs
index 0d2f03d84b..2871417d07 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Mass.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Mass.g.cs
@@ -51,7 +51,6 @@ public struct Mass
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Mass(double value, MassUnit unit)
{
_value = value;
@@ -221,163 +220,136 @@ public Mass(double value, MassUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromCentigrams(double centigrams) => new Mass(centigrams, MassUnit.Centigram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromDecagrams(double decagrams) => new Mass(decagrams, MassUnit.Decagram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromDecigrams(double decigrams) => new Mass(decigrams, MassUnit.Decigram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromEarthMasses(double earthmasses) => new Mass(earthmasses, MassUnit.EarthMass);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromFemtograms(double femtograms) => new Mass(femtograms, MassUnit.Femtogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromGrains(double grains) => new Mass(grains, MassUnit.Grain);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromGrams(double grams) => new Mass(grams, MassUnit.Gram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromHectograms(double hectograms) => new Mass(hectograms, MassUnit.Hectogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromKilograms(double kilograms) => new Mass(kilograms, MassUnit.Kilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromKilopounds(double kilopounds) => new Mass(kilopounds, MassUnit.Kilopound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromKilotonnes(double kilotonnes) => new Mass(kilotonnes, MassUnit.Kilotonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromLongHundredweight(double longhundredweight) => new Mass(longhundredweight, MassUnit.LongHundredweight);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromLongTons(double longtons) => new Mass(longtons, MassUnit.LongTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromMegapounds(double megapounds) => new Mass(megapounds, MassUnit.Megapound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromMegatonnes(double megatonnes) => new Mass(megatonnes, MassUnit.Megatonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromMicrograms(double micrograms) => new Mass(micrograms, MassUnit.Microgram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromMilligrams(double milligrams) => new Mass(milligrams, MassUnit.Milligram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromNanograms(double nanograms) => new Mass(nanograms, MassUnit.Nanogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromOunces(double ounces) => new Mass(ounces, MassUnit.Ounce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromPicograms(double picograms) => new Mass(picograms, MassUnit.Picogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromPounds(double pounds) => new Mass(pounds, MassUnit.Pound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromShortHundredweight(double shorthundredweight) => new Mass(shorthundredweight, MassUnit.ShortHundredweight);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromShortTons(double shorttons) => new Mass(shorttons, MassUnit.ShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromSlugs(double slugs) => new Mass(slugs, MassUnit.Slug);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromSolarMasses(double solarmasses) => new Mass(solarmasses, MassUnit.SolarMass);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromStone(double stone) => new Mass(stone, MassUnit.Stone);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Mass FromTonnes(double tonnes) => new Mass(tonnes, MassUnit.Tonne);
///
@@ -425,14 +397,14 @@ private double GetValueInBaseUnit()
MassUnit.Decigram => (_value / 1e3) * 1e-1d,
MassUnit.EarthMass => _value * 5.9722E+24,
MassUnit.Femtogram => (_value / 1e3) * 1e-15d,
- MassUnit.Grain => _value / 15432.358352941431,
+ MassUnit.Grain => _value * 64.79891e-6,
MassUnit.Gram => _value / 1e3,
MassUnit.Hectogram => (_value / 1e3) * 1e2d,
MassUnit.Kilogram => (_value / 1e3) * 1e3d,
MassUnit.Kilopound => (_value * 0.45359237) * 1e3d,
MassUnit.Kilotonne => (_value * 1e3) * 1e3d,
- MassUnit.LongHundredweight => _value / 0.01968413055222121,
- MassUnit.LongTon => _value * 1.0160469088e3,
+ MassUnit.LongHundredweight => _value * 50.80234544,
+ MassUnit.LongTon => _value * 1016.0469088,
MassUnit.Megapound => (_value * 0.45359237) * 1e6d,
MassUnit.Megatonne => (_value * 1e3) * 1e6d,
MassUnit.Microgram => (_value / 1e3) * 1e-6d,
@@ -441,11 +413,11 @@ private double GetValueInBaseUnit()
MassUnit.Ounce => _value * 0.028349523125,
MassUnit.Picogram => (_value / 1e3) * 1e-12d,
MassUnit.Pound => _value * 0.45359237,
- MassUnit.ShortHundredweight => _value / 0.022046226218487758,
- MassUnit.ShortTon => _value * 9.0718474e2,
- MassUnit.Slug => _value / 6.852176556196105e-2,
+ MassUnit.ShortHundredweight => _value * 45.359237,
+ MassUnit.ShortTon => _value * 907.18474,
+ MassUnit.Slug => _value * 0.45359237 * 9.80665 / 0.3048,
MassUnit.SolarMass => _value * 1.98947e30,
- MassUnit.Stone => _value / 0.1574731728702698,
+ MassUnit.Stone => _value * 6.35029318,
MassUnit.Tonne => _value * 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -465,14 +437,14 @@ private double GetValueAs(MassUnit unit)
MassUnit.Decigram => (baseUnitValue * 1e3) / 1e-1d,
MassUnit.EarthMass => baseUnitValue / 5.9722E+24,
MassUnit.Femtogram => (baseUnitValue * 1e3) / 1e-15d,
- MassUnit.Grain => baseUnitValue * 15432.358352941431,
+ MassUnit.Grain => baseUnitValue / 64.79891e-6,
MassUnit.Gram => baseUnitValue * 1e3,
MassUnit.Hectogram => (baseUnitValue * 1e3) / 1e2d,
MassUnit.Kilogram => (baseUnitValue * 1e3) / 1e3d,
MassUnit.Kilopound => (baseUnitValue / 0.45359237) / 1e3d,
MassUnit.Kilotonne => (baseUnitValue / 1e3) / 1e3d,
- MassUnit.LongHundredweight => baseUnitValue * 0.01968413055222121,
- MassUnit.LongTon => baseUnitValue / 1.0160469088e3,
+ MassUnit.LongHundredweight => baseUnitValue / 50.80234544,
+ MassUnit.LongTon => baseUnitValue / 1016.0469088,
MassUnit.Megapound => (baseUnitValue / 0.45359237) / 1e6d,
MassUnit.Megatonne => (baseUnitValue / 1e3) / 1e6d,
MassUnit.Microgram => (baseUnitValue * 1e3) / 1e-6d,
@@ -481,11 +453,11 @@ private double GetValueAs(MassUnit unit)
MassUnit.Ounce => baseUnitValue / 0.028349523125,
MassUnit.Picogram => (baseUnitValue * 1e3) / 1e-12d,
MassUnit.Pound => baseUnitValue / 0.45359237,
- MassUnit.ShortHundredweight => baseUnitValue * 0.022046226218487758,
- MassUnit.ShortTon => baseUnitValue / 9.0718474e2,
- MassUnit.Slug => baseUnitValue * 6.852176556196105e-2,
+ MassUnit.ShortHundredweight => baseUnitValue / 45.359237,
+ MassUnit.ShortTon => baseUnitValue / 907.18474,
+ MassUnit.Slug => baseUnitValue * 0.3048 / (0.45359237 * 9.80665),
MassUnit.SolarMass => baseUnitValue / 1.98947e30,
- MassUnit.Stone => baseUnitValue * 0.1574731728702698,
+ MassUnit.Stone => baseUnitValue / 6.35029318,
MassUnit.Tonne => baseUnitValue / 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassConcentration.g.cs
index a7d1733972..83586ed26f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassConcentration.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassConcentration.g.cs
@@ -54,7 +54,6 @@ public struct MassConcentration
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MassConcentration(double value, MassConcentrationUnit unit)
{
_value = value;
@@ -334,295 +333,246 @@ public MassConcentration(double value, MassConcentrationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromCentigramsPerDeciliter(double centigramsperdeciliter) => new MassConcentration(centigramsperdeciliter, MassConcentrationUnit.CentigramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromCentigramsPerLiter(double centigramsperliter) => new MassConcentration(centigramsperliter, MassConcentrationUnit.CentigramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromCentigramsPerMicroliter(double centigramspermicroliter) => new MassConcentration(centigramspermicroliter, MassConcentrationUnit.CentigramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromCentigramsPerMilliliter(double centigramspermilliliter) => new MassConcentration(centigramspermilliliter, MassConcentrationUnit.CentigramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromDecigramsPerDeciliter(double decigramsperdeciliter) => new MassConcentration(decigramsperdeciliter, MassConcentrationUnit.DecigramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromDecigramsPerLiter(double decigramsperliter) => new MassConcentration(decigramsperliter, MassConcentrationUnit.DecigramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromDecigramsPerMicroliter(double decigramspermicroliter) => new MassConcentration(decigramspermicroliter, MassConcentrationUnit.DecigramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromDecigramsPerMilliliter(double decigramspermilliliter) => new MassConcentration(decigramspermilliliter, MassConcentrationUnit.DecigramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerCubicCentimeter(double gramspercubiccentimeter) => new MassConcentration(gramspercubiccentimeter, MassConcentrationUnit.GramPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerCubicMeter(double gramspercubicmeter) => new MassConcentration(gramspercubicmeter, MassConcentrationUnit.GramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerCubicMillimeter(double gramspercubicmillimeter) => new MassConcentration(gramspercubicmillimeter, MassConcentrationUnit.GramPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerDeciliter(double gramsperdeciliter) => new MassConcentration(gramsperdeciliter, MassConcentrationUnit.GramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerLiter(double gramsperliter) => new MassConcentration(gramsperliter, MassConcentrationUnit.GramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerMicroliter(double gramspermicroliter) => new MassConcentration(gramspermicroliter, MassConcentrationUnit.GramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromGramsPerMilliliter(double gramspermilliliter) => new MassConcentration(gramspermilliliter, MassConcentrationUnit.GramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilogramsPerCubicCentimeter(double kilogramspercubiccentimeter) => new MassConcentration(kilogramspercubiccentimeter, MassConcentrationUnit.KilogramPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilogramsPerCubicMeter(double kilogramspercubicmeter) => new MassConcentration(kilogramspercubicmeter, MassConcentrationUnit.KilogramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilogramsPerCubicMillimeter(double kilogramspercubicmillimeter) => new MassConcentration(kilogramspercubicmillimeter, MassConcentrationUnit.KilogramPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilogramsPerLiter(double kilogramsperliter) => new MassConcentration(kilogramsperliter, MassConcentrationUnit.KilogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilopoundsPerCubicFoot(double kilopoundspercubicfoot) => new MassConcentration(kilopoundspercubicfoot, MassConcentrationUnit.KilopoundPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromKilopoundsPerCubicInch(double kilopoundspercubicinch) => new MassConcentration(kilopoundspercubicinch, MassConcentrationUnit.KilopoundPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMicrogramsPerCubicMeter(double microgramspercubicmeter) => new MassConcentration(microgramspercubicmeter, MassConcentrationUnit.MicrogramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMicrogramsPerDeciliter(double microgramsperdeciliter) => new MassConcentration(microgramsperdeciliter, MassConcentrationUnit.MicrogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMicrogramsPerLiter(double microgramsperliter) => new MassConcentration(microgramsperliter, MassConcentrationUnit.MicrogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMicrogramsPerMicroliter(double microgramspermicroliter) => new MassConcentration(microgramspermicroliter, MassConcentrationUnit.MicrogramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMicrogramsPerMilliliter(double microgramspermilliliter) => new MassConcentration(microgramspermilliliter, MassConcentrationUnit.MicrogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMilligramsPerCubicMeter(double milligramspercubicmeter) => new MassConcentration(milligramspercubicmeter, MassConcentrationUnit.MilligramPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMilligramsPerDeciliter(double milligramsperdeciliter) => new MassConcentration(milligramsperdeciliter, MassConcentrationUnit.MilligramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMilligramsPerLiter(double milligramsperliter) => new MassConcentration(milligramsperliter, MassConcentrationUnit.MilligramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMilligramsPerMicroliter(double milligramspermicroliter) => new MassConcentration(milligramspermicroliter, MassConcentrationUnit.MilligramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromMilligramsPerMilliliter(double milligramspermilliliter) => new MassConcentration(milligramspermilliliter, MassConcentrationUnit.MilligramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromNanogramsPerDeciliter(double nanogramsperdeciliter) => new MassConcentration(nanogramsperdeciliter, MassConcentrationUnit.NanogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromNanogramsPerLiter(double nanogramsperliter) => new MassConcentration(nanogramsperliter, MassConcentrationUnit.NanogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromNanogramsPerMicroliter(double nanogramspermicroliter) => new MassConcentration(nanogramspermicroliter, MassConcentrationUnit.NanogramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromNanogramsPerMilliliter(double nanogramspermilliliter) => new MassConcentration(nanogramspermilliliter, MassConcentrationUnit.NanogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromOuncesPerImperialGallon(double ouncesperimperialgallon) => new MassConcentration(ouncesperimperialgallon, MassConcentrationUnit.OuncePerImperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromOuncesPerUSGallon(double ouncesperusgallon) => new MassConcentration(ouncesperusgallon, MassConcentrationUnit.OuncePerUSGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPicogramsPerDeciliter(double picogramsperdeciliter) => new MassConcentration(picogramsperdeciliter, MassConcentrationUnit.PicogramPerDeciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPicogramsPerLiter(double picogramsperliter) => new MassConcentration(picogramsperliter, MassConcentrationUnit.PicogramPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPicogramsPerMicroliter(double picogramspermicroliter) => new MassConcentration(picogramspermicroliter, MassConcentrationUnit.PicogramPerMicroliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPicogramsPerMilliliter(double picogramspermilliliter) => new MassConcentration(picogramspermilliliter, MassConcentrationUnit.PicogramPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPoundsPerCubicFoot(double poundspercubicfoot) => new MassConcentration(poundspercubicfoot, MassConcentrationUnit.PoundPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPoundsPerCubicInch(double poundspercubicinch) => new MassConcentration(poundspercubicinch, MassConcentrationUnit.PoundPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPoundsPerImperialGallon(double poundsperimperialgallon) => new MassConcentration(poundsperimperialgallon, MassConcentrationUnit.PoundPerImperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromPoundsPerUSGallon(double poundsperusgallon) => new MassConcentration(poundsperusgallon, MassConcentrationUnit.PoundPerUSGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromSlugsPerCubicFoot(double slugspercubicfoot) => new MassConcentration(slugspercubicfoot, MassConcentrationUnit.SlugPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromTonnesPerCubicCentimeter(double tonnespercubiccentimeter) => new MassConcentration(tonnespercubiccentimeter, MassConcentrationUnit.TonnePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromTonnesPerCubicMeter(double tonnespercubicmeter) => new MassConcentration(tonnespercubicmeter, MassConcentrationUnit.TonnePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassConcentration FromTonnesPerCubicMillimeter(double tonnespercubicmillimeter) => new MassConcentration(tonnespercubicmillimeter, MassConcentrationUnit.TonnePerCubicMillimeter);
///
@@ -684,8 +634,8 @@ private double GetValueInBaseUnit()
MassConcentrationUnit.KilogramPerCubicMeter => (_value / 1e3) * 1e3d,
MassConcentrationUnit.KilogramPerCubicMillimeter => (_value / 1e-6) * 1e3d,
MassConcentrationUnit.KilogramPerLiter => (_value) * 1e3d,
- MassConcentrationUnit.KilopoundPerCubicFoot => (_value / 0.062427961) * 1e3d,
- MassConcentrationUnit.KilopoundPerCubicInch => (_value / 3.6127298147753e-5) * 1e3d,
+ MassConcentrationUnit.KilopoundPerCubicFoot => (_value * 0.45359237 / 0.028316846592) * 1e3d,
+ MassConcentrationUnit.KilopoundPerCubicInch => (_value * 0.45359237 / 1.6387064e-5) * 1e3d,
MassConcentrationUnit.MicrogramPerCubicMeter => (_value / 1e3) * 1e-6d,
MassConcentrationUnit.MicrogramPerDeciliter => (_value / 1e-1) * 1e-6d,
MassConcentrationUnit.MicrogramPerLiter => (_value) * 1e-6d,
@@ -700,17 +650,17 @@ private double GetValueInBaseUnit()
MassConcentrationUnit.NanogramPerLiter => (_value) * 1e-9d,
MassConcentrationUnit.NanogramPerMicroliter => (_value / 1e-6) * 1e-9d,
MassConcentrationUnit.NanogramPerMilliliter => (_value / 1e-3) * 1e-9d,
- MassConcentrationUnit.OuncePerImperialGallon => _value / 0.1603586720609,
- MassConcentrationUnit.OuncePerUSGallon => _value / 0.1335264711843,
+ MassConcentrationUnit.OuncePerImperialGallon => _value * 0.028349523125 / 0.00454609,
+ MassConcentrationUnit.OuncePerUSGallon => _value * 0.028349523125 / 0.003785411784,
MassConcentrationUnit.PicogramPerDeciliter => (_value / 1e-1) * 1e-12d,
MassConcentrationUnit.PicogramPerLiter => (_value) * 1e-12d,
MassConcentrationUnit.PicogramPerMicroliter => (_value / 1e-6) * 1e-12d,
MassConcentrationUnit.PicogramPerMilliliter => (_value / 1e-3) * 1e-12d,
- MassConcentrationUnit.PoundPerCubicFoot => _value / 0.062427961,
- MassConcentrationUnit.PoundPerCubicInch => _value / 3.6127298147753e-5,
- MassConcentrationUnit.PoundPerImperialGallon => _value * 9.9776398e1,
- MassConcentrationUnit.PoundPerUSGallon => _value * 1.19826427e2,
- MassConcentrationUnit.SlugPerCubicFoot => _value * 515.378818,
+ MassConcentrationUnit.PoundPerCubicFoot => _value * 0.45359237 / 0.028316846592,
+ MassConcentrationUnit.PoundPerCubicInch => _value * 0.45359237 / 1.6387064e-5,
+ MassConcentrationUnit.PoundPerImperialGallon => _value * 0.45359237 / 0.00454609,
+ MassConcentrationUnit.PoundPerUSGallon => _value * 0.45359237 / 0.003785411784,
+ MassConcentrationUnit.SlugPerCubicFoot => _value * (0.45359237 * 9.80665) / (0.3048 * 0.028316846592),
MassConcentrationUnit.TonnePerCubicCentimeter => _value / 1e-9,
MassConcentrationUnit.TonnePerCubicMeter => _value / 0.001,
MassConcentrationUnit.TonnePerCubicMillimeter => _value / 1e-12,
@@ -746,8 +696,8 @@ private double GetValueAs(MassConcentrationUnit unit)
MassConcentrationUnit.KilogramPerCubicMeter => (baseUnitValue * 1e3) / 1e3d,
MassConcentrationUnit.KilogramPerCubicMillimeter => (baseUnitValue * 1e-6) / 1e3d,
MassConcentrationUnit.KilogramPerLiter => (baseUnitValue) / 1e3d,
- MassConcentrationUnit.KilopoundPerCubicFoot => (baseUnitValue * 0.062427961) / 1e3d,
- MassConcentrationUnit.KilopoundPerCubicInch => (baseUnitValue * 3.6127298147753e-5) / 1e3d,
+ MassConcentrationUnit.KilopoundPerCubicFoot => (baseUnitValue * 0.028316846592 / 0.45359237) / 1e3d,
+ MassConcentrationUnit.KilopoundPerCubicInch => (baseUnitValue * 1.6387064e-5 / 0.45359237) / 1e3d,
MassConcentrationUnit.MicrogramPerCubicMeter => (baseUnitValue * 1e3) / 1e-6d,
MassConcentrationUnit.MicrogramPerDeciliter => (baseUnitValue * 1e-1) / 1e-6d,
MassConcentrationUnit.MicrogramPerLiter => (baseUnitValue) / 1e-6d,
@@ -762,17 +712,17 @@ private double GetValueAs(MassConcentrationUnit unit)
MassConcentrationUnit.NanogramPerLiter => (baseUnitValue) / 1e-9d,
MassConcentrationUnit.NanogramPerMicroliter => (baseUnitValue * 1e-6) / 1e-9d,
MassConcentrationUnit.NanogramPerMilliliter => (baseUnitValue * 1e-3) / 1e-9d,
- MassConcentrationUnit.OuncePerImperialGallon => baseUnitValue * 0.1603586720609,
- MassConcentrationUnit.OuncePerUSGallon => baseUnitValue * 0.1335264711843,
+ MassConcentrationUnit.OuncePerImperialGallon => baseUnitValue * 0.00454609 / 0.028349523125,
+ MassConcentrationUnit.OuncePerUSGallon => baseUnitValue * 0.003785411784 / 0.028349523125,
MassConcentrationUnit.PicogramPerDeciliter => (baseUnitValue * 1e-1) / 1e-12d,
MassConcentrationUnit.PicogramPerLiter => (baseUnitValue) / 1e-12d,
MassConcentrationUnit.PicogramPerMicroliter => (baseUnitValue * 1e-6) / 1e-12d,
MassConcentrationUnit.PicogramPerMilliliter => (baseUnitValue * 1e-3) / 1e-12d,
- MassConcentrationUnit.PoundPerCubicFoot => baseUnitValue * 0.062427961,
- MassConcentrationUnit.PoundPerCubicInch => baseUnitValue * 3.6127298147753e-5,
- MassConcentrationUnit.PoundPerImperialGallon => baseUnitValue / 9.9776398e1,
- MassConcentrationUnit.PoundPerUSGallon => baseUnitValue / 1.19826427e2,
- MassConcentrationUnit.SlugPerCubicFoot => baseUnitValue * 0.00194032033,
+ MassConcentrationUnit.PoundPerCubicFoot => baseUnitValue * 0.028316846592 / 0.45359237,
+ MassConcentrationUnit.PoundPerCubicInch => baseUnitValue * 1.6387064e-5 / 0.45359237,
+ MassConcentrationUnit.PoundPerImperialGallon => baseUnitValue * 0.00454609 / 0.45359237,
+ MassConcentrationUnit.PoundPerUSGallon => baseUnitValue * 0.003785411784 / 0.45359237,
+ MassConcentrationUnit.SlugPerCubicFoot => baseUnitValue * (0.3048 * 0.028316846592) / (0.45359237 * 9.80665),
MassConcentrationUnit.TonnePerCubicCentimeter => baseUnitValue * 1e-9,
MassConcentrationUnit.TonnePerCubicMeter => baseUnitValue * 0.001,
MassConcentrationUnit.TonnePerCubicMillimeter => baseUnitValue * 1e-12,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlow.g.cs
index c1039b2df2..5098dcfbc2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlow.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlow.g.cs
@@ -51,7 +51,6 @@ public struct MassFlow
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MassFlow(double value, MassFlowUnit unit)
{
_value = value;
@@ -251,199 +250,166 @@ public MassFlow(double value, MassFlowUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromCentigramsPerDay(double centigramsperday) => new MassFlow(centigramsperday, MassFlowUnit.CentigramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromCentigramsPerSecond(double centigramspersecond) => new MassFlow(centigramspersecond, MassFlowUnit.CentigramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromDecagramsPerDay(double decagramsperday) => new MassFlow(decagramsperday, MassFlowUnit.DecagramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromDecagramsPerSecond(double decagramspersecond) => new MassFlow(decagramspersecond, MassFlowUnit.DecagramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromDecigramsPerDay(double decigramsperday) => new MassFlow(decigramsperday, MassFlowUnit.DecigramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromDecigramsPerSecond(double decigramspersecond) => new MassFlow(decigramspersecond, MassFlowUnit.DecigramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromGramsPerDay(double gramsperday) => new MassFlow(gramsperday, MassFlowUnit.GramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromGramsPerHour(double gramsperhour) => new MassFlow(gramsperhour, MassFlowUnit.GramPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromGramsPerSecond(double gramspersecond) => new MassFlow(gramspersecond, MassFlowUnit.GramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromHectogramsPerDay(double hectogramsperday) => new MassFlow(hectogramsperday, MassFlowUnit.HectogramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromHectogramsPerSecond(double hectogramspersecond) => new MassFlow(hectogramspersecond, MassFlowUnit.HectogramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromKilogramsPerDay(double kilogramsperday) => new MassFlow(kilogramsperday, MassFlowUnit.KilogramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromKilogramsPerHour(double kilogramsperhour) => new MassFlow(kilogramsperhour, MassFlowUnit.KilogramPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromKilogramsPerMinute(double kilogramsperminute) => new MassFlow(kilogramsperminute, MassFlowUnit.KilogramPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromKilogramsPerSecond(double kilogramspersecond) => new MassFlow(kilogramspersecond, MassFlowUnit.KilogramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMegagramsPerDay(double megagramsperday) => new MassFlow(megagramsperday, MassFlowUnit.MegagramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMegapoundsPerDay(double megapoundsperday) => new MassFlow(megapoundsperday, MassFlowUnit.MegapoundPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMegapoundsPerHour(double megapoundsperhour) => new MassFlow(megapoundsperhour, MassFlowUnit.MegapoundPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMegapoundsPerMinute(double megapoundsperminute) => new MassFlow(megapoundsperminute, MassFlowUnit.MegapoundPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMegapoundsPerSecond(double megapoundspersecond) => new MassFlow(megapoundspersecond, MassFlowUnit.MegapoundPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMicrogramsPerDay(double microgramsperday) => new MassFlow(microgramsperday, MassFlowUnit.MicrogramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMicrogramsPerSecond(double microgramspersecond) => new MassFlow(microgramspersecond, MassFlowUnit.MicrogramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMilligramsPerDay(double milligramsperday) => new MassFlow(milligramsperday, MassFlowUnit.MilligramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromMilligramsPerSecond(double milligramspersecond) => new MassFlow(milligramspersecond, MassFlowUnit.MilligramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromNanogramsPerDay(double nanogramsperday) => new MassFlow(nanogramsperday, MassFlowUnit.NanogramPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromNanogramsPerSecond(double nanogramspersecond) => new MassFlow(nanogramspersecond, MassFlowUnit.NanogramPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromPoundsPerDay(double poundsperday) => new MassFlow(poundsperday, MassFlowUnit.PoundPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromPoundsPerHour(double poundsperhour) => new MassFlow(poundsperhour, MassFlowUnit.PoundPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromPoundsPerMinute(double poundsperminute) => new MassFlow(poundsperminute, MassFlowUnit.PoundPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromPoundsPerSecond(double poundspersecond) => new MassFlow(poundspersecond, MassFlowUnit.PoundPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromShortTonsPerHour(double shorttonsperhour) => new MassFlow(shorttonsperhour, MassFlowUnit.ShortTonPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromTonnesPerDay(double tonnesperday) => new MassFlow(tonnesperday, MassFlowUnit.TonnePerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlow FromTonnesPerHour(double tonnesperhour) => new MassFlow(tonnesperhour, MassFlowUnit.TonnePerHour);
///
@@ -502,9 +468,9 @@ private double GetValueInBaseUnit()
MassFlowUnit.KilogramPerMinute => _value / 0.06,
MassFlowUnit.KilogramPerSecond => (_value) * 1e3d,
MassFlowUnit.MegagramPerDay => (_value / 86400) * 1e6d,
- MassFlowUnit.MegapoundPerDay => (_value / 190.47936) * 1e6d,
- MassFlowUnit.MegapoundPerHour => (_value / 7.93664) * 1e6d,
- MassFlowUnit.MegapoundPerMinute => (_value / 0.132277) * 1e6d,
+ MassFlowUnit.MegapoundPerDay => (_value * 453.59237 / 86400) * 1e6d,
+ MassFlowUnit.MegapoundPerHour => (_value * 453.59237 / 3600) * 1e6d,
+ MassFlowUnit.MegapoundPerMinute => (_value * 453.59237 / 60) * 1e6d,
MassFlowUnit.MegapoundPerSecond => (_value * 453.59237) * 1e6d,
MassFlowUnit.MicrogramPerDay => (_value / 86400) * 1e-6d,
MassFlowUnit.MicrogramPerSecond => (_value) * 1e-6d,
@@ -512,13 +478,13 @@ private double GetValueInBaseUnit()
MassFlowUnit.MilligramPerSecond => (_value) * 1e-3d,
MassFlowUnit.NanogramPerDay => (_value / 86400) * 1e-9d,
MassFlowUnit.NanogramPerSecond => (_value) * 1e-9d,
- MassFlowUnit.PoundPerDay => _value / 190.47936,
- MassFlowUnit.PoundPerHour => _value / 7.93664,
- MassFlowUnit.PoundPerMinute => _value / 0.132277,
+ MassFlowUnit.PoundPerDay => _value * 453.59237 / 86400,
+ MassFlowUnit.PoundPerHour => _value * 453.59237 / 3600,
+ MassFlowUnit.PoundPerMinute => _value * 453.59237 / 60,
MassFlowUnit.PoundPerSecond => _value * 453.59237,
- MassFlowUnit.ShortTonPerHour => _value * 251.9957611,
+ MassFlowUnit.ShortTonPerHour => _value * 907.18474 / 3.6,
MassFlowUnit.TonnePerDay => _value / 0.0864000,
- MassFlowUnit.TonnePerHour => 1000 * _value / 3.6,
+ MassFlowUnit.TonnePerHour => _value * 1000 / 3.6,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -548,9 +514,9 @@ private double GetValueAs(MassFlowUnit unit)
MassFlowUnit.KilogramPerMinute => baseUnitValue * 0.06,
MassFlowUnit.KilogramPerSecond => (baseUnitValue) / 1e3d,
MassFlowUnit.MegagramPerDay => (baseUnitValue * 86400) / 1e6d,
- MassFlowUnit.MegapoundPerDay => (baseUnitValue * 190.47936) / 1e6d,
- MassFlowUnit.MegapoundPerHour => (baseUnitValue * 7.93664) / 1e6d,
- MassFlowUnit.MegapoundPerMinute => (baseUnitValue * 0.132277) / 1e6d,
+ MassFlowUnit.MegapoundPerDay => (baseUnitValue * 86400 / 453.59237) / 1e6d,
+ MassFlowUnit.MegapoundPerHour => (baseUnitValue * 3600 / 453.59237) / 1e6d,
+ MassFlowUnit.MegapoundPerMinute => (baseUnitValue * 60 / 453.59237) / 1e6d,
MassFlowUnit.MegapoundPerSecond => (baseUnitValue / 453.59237) / 1e6d,
MassFlowUnit.MicrogramPerDay => (baseUnitValue * 86400) / 1e-6d,
MassFlowUnit.MicrogramPerSecond => (baseUnitValue) / 1e-6d,
@@ -558,11 +524,11 @@ private double GetValueAs(MassFlowUnit unit)
MassFlowUnit.MilligramPerSecond => (baseUnitValue) / 1e-3d,
MassFlowUnit.NanogramPerDay => (baseUnitValue * 86400) / 1e-9d,
MassFlowUnit.NanogramPerSecond => (baseUnitValue) / 1e-9d,
- MassFlowUnit.PoundPerDay => baseUnitValue * 190.47936,
- MassFlowUnit.PoundPerHour => baseUnitValue * 7.93664,
- MassFlowUnit.PoundPerMinute => baseUnitValue * 0.132277,
+ MassFlowUnit.PoundPerDay => baseUnitValue * 86400 / 453.59237,
+ MassFlowUnit.PoundPerHour => baseUnitValue * 3600 / 453.59237,
+ MassFlowUnit.PoundPerMinute => baseUnitValue * 60 / 453.59237,
MassFlowUnit.PoundPerSecond => baseUnitValue / 453.59237,
- MassFlowUnit.ShortTonPerHour => baseUnitValue / 251.9957611,
+ MassFlowUnit.ShortTonPerHour => baseUnitValue * 3.6 / 907.18474,
MassFlowUnit.TonnePerDay => baseUnitValue * 0.0864000,
MassFlowUnit.TonnePerHour => baseUnitValue * 3.6 / 1000,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlux.g.cs
index 9d33102563..af6f9bb93a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlux.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFlux.g.cs
@@ -51,7 +51,6 @@ public struct MassFlux
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MassFlux(double value, MassFluxUnit unit)
{
_value = value;
@@ -146,73 +145,61 @@ public MassFlux(double value, MassFluxUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerHourPerSquareCentimeter(double gramsperhourpersquarecentimeter) => new MassFlux(gramsperhourpersquarecentimeter, MassFluxUnit.GramPerHourPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerHourPerSquareMeter(double gramsperhourpersquaremeter) => new MassFlux(gramsperhourpersquaremeter, MassFluxUnit.GramPerHourPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerHourPerSquareMillimeter(double gramsperhourpersquaremillimeter) => new MassFlux(gramsperhourpersquaremillimeter, MassFluxUnit.GramPerHourPerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerSecondPerSquareCentimeter(double gramspersecondpersquarecentimeter) => new MassFlux(gramspersecondpersquarecentimeter, MassFluxUnit.GramPerSecondPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerSecondPerSquareMeter(double gramspersecondpersquaremeter) => new MassFlux(gramspersecondpersquaremeter, MassFluxUnit.GramPerSecondPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromGramsPerSecondPerSquareMillimeter(double gramspersecondpersquaremillimeter) => new MassFlux(gramspersecondpersquaremillimeter, MassFluxUnit.GramPerSecondPerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerHourPerSquareCentimeter(double kilogramsperhourpersquarecentimeter) => new MassFlux(kilogramsperhourpersquarecentimeter, MassFluxUnit.KilogramPerHourPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerHourPerSquareMeter(double kilogramsperhourpersquaremeter) => new MassFlux(kilogramsperhourpersquaremeter, MassFluxUnit.KilogramPerHourPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerHourPerSquareMillimeter(double kilogramsperhourpersquaremillimeter) => new MassFlux(kilogramsperhourpersquaremillimeter, MassFluxUnit.KilogramPerHourPerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerSecondPerSquareCentimeter(double kilogramspersecondpersquarecentimeter) => new MassFlux(kilogramspersecondpersquarecentimeter, MassFluxUnit.KilogramPerSecondPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerSecondPerSquareMeter(double kilogramspersecondpersquaremeter) => new MassFlux(kilogramspersecondpersquaremeter, MassFluxUnit.KilogramPerSecondPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFlux FromKilogramsPerSecondPerSquareMillimeter(double kilogramspersecondpersquaremillimeter) => new MassFlux(kilogramspersecondpersquaremillimeter, MassFluxUnit.KilogramPerSecondPerSquareMillimeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFraction.g.cs
index 7a0fb65050..038cc7aade 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFraction.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassFraction.g.cs
@@ -54,7 +54,6 @@ public struct MassFraction
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MassFraction(double value, MassFractionUnit unit)
{
_value = value;
@@ -209,145 +208,121 @@ public MassFraction(double value, MassFractionUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromCentigramsPerGram(double centigramspergram) => new MassFraction(centigramspergram, MassFractionUnit.CentigramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromCentigramsPerKilogram(double centigramsperkilogram) => new MassFraction(centigramsperkilogram, MassFractionUnit.CentigramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromDecagramsPerGram(double decagramspergram) => new MassFraction(decagramspergram, MassFractionUnit.DecagramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromDecagramsPerKilogram(double decagramsperkilogram) => new MassFraction(decagramsperkilogram, MassFractionUnit.DecagramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromDecigramsPerGram(double decigramspergram) => new MassFraction(decigramspergram, MassFractionUnit.DecigramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromDecigramsPerKilogram(double decigramsperkilogram) => new MassFraction(decigramsperkilogram, MassFractionUnit.DecigramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromDecimalFractions(double decimalfractions) => new MassFraction(decimalfractions, MassFractionUnit.DecimalFraction);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromGramsPerGram(double gramspergram) => new MassFraction(gramspergram, MassFractionUnit.GramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromGramsPerKilogram(double gramsperkilogram) => new MassFraction(gramsperkilogram, MassFractionUnit.GramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromHectogramsPerGram(double hectogramspergram) => new MassFraction(hectogramspergram, MassFractionUnit.HectogramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromHectogramsPerKilogram(double hectogramsperkilogram) => new MassFraction(hectogramsperkilogram, MassFractionUnit.HectogramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromKilogramsPerGram(double kilogramspergram) => new MassFraction(kilogramspergram, MassFractionUnit.KilogramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromKilogramsPerKilogram(double kilogramsperkilogram) => new MassFraction(kilogramsperkilogram, MassFractionUnit.KilogramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromMicrogramsPerGram(double microgramspergram) => new MassFraction(microgramspergram, MassFractionUnit.MicrogramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromMicrogramsPerKilogram(double microgramsperkilogram) => new MassFraction(microgramsperkilogram, MassFractionUnit.MicrogramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromMilligramsPerGram(double milligramspergram) => new MassFraction(milligramspergram, MassFractionUnit.MilligramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromMilligramsPerKilogram(double milligramsperkilogram) => new MassFraction(milligramsperkilogram, MassFractionUnit.MilligramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromNanogramsPerGram(double nanogramspergram) => new MassFraction(nanogramspergram, MassFractionUnit.NanogramPerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromNanogramsPerKilogram(double nanogramsperkilogram) => new MassFraction(nanogramsperkilogram, MassFractionUnit.NanogramPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromPartsPerBillion(double partsperbillion) => new MassFraction(partsperbillion, MassFractionUnit.PartPerBillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromPartsPerMillion(double partspermillion) => new MassFraction(partspermillion, MassFractionUnit.PartPerMillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromPartsPerThousand(double partsperthousand) => new MassFraction(partsperthousand, MassFractionUnit.PartPerThousand);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromPartsPerTrillion(double partspertrillion) => new MassFraction(partspertrillion, MassFractionUnit.PartPerTrillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassFraction FromPercent(double percent) => new MassFraction(percent, MassFractionUnit.Percent);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
index bdea3d3789..8de0bbb9de 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MassMomentOfInertia.g.cs
@@ -51,7 +51,6 @@ public struct MassMomentOfInertia
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MassMomentOfInertia(double value, MassMomentOfInertiaUnit unit)
{
_value = value;
@@ -135,9 +134,9 @@ public MassMomentOfInertia(double value, MassMomentOfInertiaUnit unit)
public double KilotonneSquareMeters => As(MassMomentOfInertiaUnit.KilotonneSquareMeter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double KilotonneSquareMilimeters => As(MassMomentOfInertiaUnit.KilotonneSquareMilimeter);
+ public double KilotonneSquareMillimeters => As(MassMomentOfInertiaUnit.KilotonneSquareMillimeter);
///
/// Gets a value of this quantity converted into
@@ -155,9 +154,9 @@ public MassMomentOfInertia(double value, MassMomentOfInertiaUnit unit)
public double MegatonneSquareMeters => As(MassMomentOfInertiaUnit.MegatonneSquareMeter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double MegatonneSquareMilimeters => As(MassMomentOfInertiaUnit.MegatonneSquareMilimeter);
+ public double MegatonneSquareMillimeters => As(MassMomentOfInertiaUnit.MegatonneSquareMillimeter);
///
/// Gets a value of this quantity converted into
@@ -215,9 +214,9 @@ public MassMomentOfInertia(double value, MassMomentOfInertiaUnit unit)
public double TonneSquareMeters => As(MassMomentOfInertiaUnit.TonneSquareMeter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double TonneSquareMilimeters => As(MassMomentOfInertiaUnit.TonneSquareMilimeter);
+ public double TonneSquareMillimeters => As(MassMomentOfInertiaUnit.TonneSquareMillimeter);
#endregion
@@ -226,170 +225,142 @@ public MassMomentOfInertia(double value, MassMomentOfInertiaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromGramSquareCentimeters(double gramsquarecentimeters) => new MassMomentOfInertia(gramsquarecentimeters, MassMomentOfInertiaUnit.GramSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromGramSquareDecimeters(double gramsquaredecimeters) => new MassMomentOfInertia(gramsquaredecimeters, MassMomentOfInertiaUnit.GramSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromGramSquareMeters(double gramsquaremeters) => new MassMomentOfInertia(gramsquaremeters, MassMomentOfInertiaUnit.GramSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromGramSquareMillimeters(double gramsquaremillimeters) => new MassMomentOfInertia(gramsquaremillimeters, MassMomentOfInertiaUnit.GramSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilogramSquareCentimeters(double kilogramsquarecentimeters) => new MassMomentOfInertia(kilogramsquarecentimeters, MassMomentOfInertiaUnit.KilogramSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilogramSquareDecimeters(double kilogramsquaredecimeters) => new MassMomentOfInertia(kilogramsquaredecimeters, MassMomentOfInertiaUnit.KilogramSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilogramSquareMeters(double kilogramsquaremeters) => new MassMomentOfInertia(kilogramsquaremeters, MassMomentOfInertiaUnit.KilogramSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilogramSquareMillimeters(double kilogramsquaremillimeters) => new MassMomentOfInertia(kilogramsquaremillimeters, MassMomentOfInertiaUnit.KilogramSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilotonneSquareCentimeters(double kilotonnesquarecentimeters) => new MassMomentOfInertia(kilotonnesquarecentimeters, MassMomentOfInertiaUnit.KilotonneSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilotonneSquareDecimeters(double kilotonnesquaredecimeters) => new MassMomentOfInertia(kilotonnesquaredecimeters, MassMomentOfInertiaUnit.KilotonneSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromKilotonneSquareMeters(double kilotonnesquaremeters) => new MassMomentOfInertia(kilotonnesquaremeters, MassMomentOfInertiaUnit.KilotonneSquareMeter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static MassMomentOfInertia FromKilotonneSquareMilimeters(double kilotonnesquaremilimeters) => new MassMomentOfInertia(kilotonnesquaremilimeters, MassMomentOfInertiaUnit.KilotonneSquareMilimeter);
+ public static MassMomentOfInertia FromKilotonneSquareMillimeters(double kilotonnesquaremillimeters) => new MassMomentOfInertia(kilotonnesquaremillimeters, MassMomentOfInertiaUnit.KilotonneSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMegatonneSquareCentimeters(double megatonnesquarecentimeters) => new MassMomentOfInertia(megatonnesquarecentimeters, MassMomentOfInertiaUnit.MegatonneSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMegatonneSquareDecimeters(double megatonnesquaredecimeters) => new MassMomentOfInertia(megatonnesquaredecimeters, MassMomentOfInertiaUnit.MegatonneSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMegatonneSquareMeters(double megatonnesquaremeters) => new MassMomentOfInertia(megatonnesquaremeters, MassMomentOfInertiaUnit.MegatonneSquareMeter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static MassMomentOfInertia FromMegatonneSquareMilimeters(double megatonnesquaremilimeters) => new MassMomentOfInertia(megatonnesquaremilimeters, MassMomentOfInertiaUnit.MegatonneSquareMilimeter);
+ public static MassMomentOfInertia FromMegatonneSquareMillimeters(double megatonnesquaremillimeters) => new MassMomentOfInertia(megatonnesquaremillimeters, MassMomentOfInertiaUnit.MegatonneSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMilligramSquareCentimeters(double milligramsquarecentimeters) => new MassMomentOfInertia(milligramsquarecentimeters, MassMomentOfInertiaUnit.MilligramSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMilligramSquareDecimeters(double milligramsquaredecimeters) => new MassMomentOfInertia(milligramsquaredecimeters, MassMomentOfInertiaUnit.MilligramSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMilligramSquareMeters(double milligramsquaremeters) => new MassMomentOfInertia(milligramsquaremeters, MassMomentOfInertiaUnit.MilligramSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromMilligramSquareMillimeters(double milligramsquaremillimeters) => new MassMomentOfInertia(milligramsquaremillimeters, MassMomentOfInertiaUnit.MilligramSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromPoundSquareFeet(double poundsquarefeet) => new MassMomentOfInertia(poundsquarefeet, MassMomentOfInertiaUnit.PoundSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromPoundSquareInches(double poundsquareinches) => new MassMomentOfInertia(poundsquareinches, MassMomentOfInertiaUnit.PoundSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromSlugSquareFeet(double slugsquarefeet) => new MassMomentOfInertia(slugsquarefeet, MassMomentOfInertiaUnit.SlugSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromSlugSquareInches(double slugsquareinches) => new MassMomentOfInertia(slugsquareinches, MassMomentOfInertiaUnit.SlugSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromTonneSquareCentimeters(double tonnesquarecentimeters) => new MassMomentOfInertia(tonnesquarecentimeters, MassMomentOfInertiaUnit.TonneSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromTonneSquareDecimeters(double tonnesquaredecimeters) => new MassMomentOfInertia(tonnesquaredecimeters, MassMomentOfInertiaUnit.TonneSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MassMomentOfInertia FromTonneSquareMeters(double tonnesquaremeters) => new MassMomentOfInertia(tonnesquaremeters, MassMomentOfInertiaUnit.TonneSquareMeter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static MassMomentOfInertia FromTonneSquareMilimeters(double tonnesquaremilimeters) => new MassMomentOfInertia(tonnesquaremilimeters, MassMomentOfInertiaUnit.TonneSquareMilimeter);
+ public static MassMomentOfInertia FromTonneSquareMillimeters(double tonnesquaremillimeters) => new MassMomentOfInertia(tonnesquaremillimeters, MassMomentOfInertiaUnit.TonneSquareMillimeter);
///
/// Dynamically convert from value and unit enum to .
@@ -442,23 +413,23 @@ private double GetValueInBaseUnit()
MassMomentOfInertiaUnit.KilotonneSquareCentimeter => (_value / 1e1) * 1e3d,
MassMomentOfInertiaUnit.KilotonneSquareDecimeter => (_value / 1e-1) * 1e3d,
MassMomentOfInertiaUnit.KilotonneSquareMeter => (_value / 1e-3) * 1e3d,
- MassMomentOfInertiaUnit.KilotonneSquareMilimeter => (_value / 1e3) * 1e3d,
+ MassMomentOfInertiaUnit.KilotonneSquareMillimeter => (_value / 1e3) * 1e3d,
MassMomentOfInertiaUnit.MegatonneSquareCentimeter => (_value / 1e1) * 1e6d,
MassMomentOfInertiaUnit.MegatonneSquareDecimeter => (_value / 1e-1) * 1e6d,
MassMomentOfInertiaUnit.MegatonneSquareMeter => (_value / 1e-3) * 1e6d,
- MassMomentOfInertiaUnit.MegatonneSquareMilimeter => (_value / 1e3) * 1e6d,
+ MassMomentOfInertiaUnit.MegatonneSquareMillimeter => (_value / 1e3) * 1e6d,
MassMomentOfInertiaUnit.MilligramSquareCentimeter => (_value / 1e7) * 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareDecimeter => (_value / 1e5) * 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareMeter => (_value / 1e3) * 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareMillimeter => (_value / 1e9) * 1e-3d,
- MassMomentOfInertiaUnit.PoundSquareFoot => _value * 4.21401101e-2,
- MassMomentOfInertiaUnit.PoundSquareInch => _value * 2.9263965e-4,
- MassMomentOfInertiaUnit.SlugSquareFoot => _value * 1.3558179619,
- MassMomentOfInertiaUnit.SlugSquareInch => _value * 9.41540242e-3,
+ MassMomentOfInertiaUnit.PoundSquareFoot => _value * (0.45359237 * 9.290304e-2),
+ MassMomentOfInertiaUnit.PoundSquareInch => _value * (0.45359237 * 0.00064516),
+ MassMomentOfInertiaUnit.SlugSquareFoot => _value * 0.45359237 * 9.290304e-2 * 9.80665 / 0.3048,
+ MassMomentOfInertiaUnit.SlugSquareInch => _value * 0.45359237 * 0.00064516 * 9.80665 / 0.3048,
MassMomentOfInertiaUnit.TonneSquareCentimeter => _value / 1e1,
MassMomentOfInertiaUnit.TonneSquareDecimeter => _value / 1e-1,
MassMomentOfInertiaUnit.TonneSquareMeter => _value / 1e-3,
- MassMomentOfInertiaUnit.TonneSquareMilimeter => _value / 1e3,
+ MassMomentOfInertiaUnit.TonneSquareMillimeter => _value / 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -483,23 +454,23 @@ private double GetValueAs(MassMomentOfInertiaUnit unit)
MassMomentOfInertiaUnit.KilotonneSquareCentimeter => (baseUnitValue * 1e1) / 1e3d,
MassMomentOfInertiaUnit.KilotonneSquareDecimeter => (baseUnitValue * 1e-1) / 1e3d,
MassMomentOfInertiaUnit.KilotonneSquareMeter => (baseUnitValue * 1e-3) / 1e3d,
- MassMomentOfInertiaUnit.KilotonneSquareMilimeter => (baseUnitValue * 1e3) / 1e3d,
+ MassMomentOfInertiaUnit.KilotonneSquareMillimeter => (baseUnitValue * 1e3) / 1e3d,
MassMomentOfInertiaUnit.MegatonneSquareCentimeter => (baseUnitValue * 1e1) / 1e6d,
MassMomentOfInertiaUnit.MegatonneSquareDecimeter => (baseUnitValue * 1e-1) / 1e6d,
MassMomentOfInertiaUnit.MegatonneSquareMeter => (baseUnitValue * 1e-3) / 1e6d,
- MassMomentOfInertiaUnit.MegatonneSquareMilimeter => (baseUnitValue * 1e3) / 1e6d,
+ MassMomentOfInertiaUnit.MegatonneSquareMillimeter => (baseUnitValue * 1e3) / 1e6d,
MassMomentOfInertiaUnit.MilligramSquareCentimeter => (baseUnitValue * 1e7) / 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareDecimeter => (baseUnitValue * 1e5) / 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareMeter => (baseUnitValue * 1e3) / 1e-3d,
MassMomentOfInertiaUnit.MilligramSquareMillimeter => (baseUnitValue * 1e9) / 1e-3d,
- MassMomentOfInertiaUnit.PoundSquareFoot => baseUnitValue / 4.21401101e-2,
- MassMomentOfInertiaUnit.PoundSquareInch => baseUnitValue / 2.9263965e-4,
- MassMomentOfInertiaUnit.SlugSquareFoot => baseUnitValue / 1.3558179619,
- MassMomentOfInertiaUnit.SlugSquareInch => baseUnitValue / 9.41540242e-3,
+ MassMomentOfInertiaUnit.PoundSquareFoot => baseUnitValue / (0.45359237 * 9.290304e-2),
+ MassMomentOfInertiaUnit.PoundSquareInch => baseUnitValue / (0.45359237 * 0.00064516),
+ MassMomentOfInertiaUnit.SlugSquareFoot => baseUnitValue * 0.3048 / (0.45359237 * 9.290304e-2 * 9.80665),
+ MassMomentOfInertiaUnit.SlugSquareInch => baseUnitValue * 0.3048 / (0.45359237 * 0.00064516 * 9.80665),
MassMomentOfInertiaUnit.TonneSquareCentimeter => baseUnitValue * 1e1,
MassMomentOfInertiaUnit.TonneSquareDecimeter => baseUnitValue * 1e-1,
MassMomentOfInertiaUnit.TonneSquareMeter => baseUnitValue * 1e-3,
- MassMomentOfInertiaUnit.TonneSquareMilimeter => baseUnitValue * 1e3,
+ MassMomentOfInertiaUnit.TonneSquareMillimeter => baseUnitValue * 1e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molality.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molality.g.cs
index 31f68b2c90..05fb9b5f05 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molality.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molality.g.cs
@@ -54,7 +54,6 @@ public struct Molality
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Molality(double value, MolalityUnit unit)
{
_value = value;
@@ -104,19 +103,16 @@ public Molality(double value, MolalityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molality FromMillimolesPerKilogram(double millimolesperkilogram) => new Molality(millimolesperkilogram, MolalityUnit.MillimolePerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molality FromMolesPerGram(double molespergram) => new Molality(molespergram, MolalityUnit.MolePerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molality FromMolesPerKilogram(double molesperkilogram) => new Molality(molesperkilogram, MolalityUnit.MolePerKilogram);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEnergy.g.cs
index 36eb7b4ae4..3c41971482 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEnergy.g.cs
@@ -51,7 +51,6 @@ public struct MolarEnergy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MolarEnergy(double value, MolarEnergyUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public MolarEnergy(double value, MolarEnergyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEnergy FromJoulesPerMole(double joulespermole) => new MolarEnergy(joulespermole, MolarEnergyUnit.JoulePerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEnergy FromKilojoulesPerMole(double kilojoulespermole) => new MolarEnergy(kilojoulespermole, MolarEnergyUnit.KilojoulePerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEnergy FromMegajoulesPerMole(double megajoulespermole) => new MolarEnergy(megajoulespermole, MolarEnergyUnit.MegajoulePerMole);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEntropy.g.cs
index ecc1635a41..6430a16ec3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEntropy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarEntropy.g.cs
@@ -51,7 +51,6 @@ public struct MolarEntropy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MolarEntropy(double value, MolarEntropyUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public MolarEntropy(double value, MolarEntropyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEntropy FromJoulesPerMoleKelvin(double joulespermolekelvin) => new MolarEntropy(joulespermolekelvin, MolarEntropyUnit.JoulePerMoleKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEntropy FromKilojoulesPerMoleKelvin(double kilojoulespermolekelvin) => new MolarEntropy(kilojoulespermolekelvin, MolarEntropyUnit.KilojoulePerMoleKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarEntropy FromMegajoulesPerMoleKelvin(double megajoulespermolekelvin) => new MolarEntropy(megajoulespermolekelvin, MolarEntropyUnit.MegajoulePerMoleKelvin);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarFlow.g.cs
index 0a6f8644e3..459637479a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarFlow.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarFlow.g.cs
@@ -51,7 +51,6 @@ public struct MolarFlow
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MolarFlow(double value, MolarFlowUnit unit)
{
_value = value;
@@ -131,55 +130,46 @@ public MolarFlow(double value, MolarFlowUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromKilomolesPerHour(double kilomolesperhour) => new MolarFlow(kilomolesperhour, MolarFlowUnit.KilomolePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromKilomolesPerMinute(double kilomolesperminute) => new MolarFlow(kilomolesperminute, MolarFlowUnit.KilomolePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromKilomolesPerSecond(double kilomolespersecond) => new MolarFlow(kilomolespersecond, MolarFlowUnit.KilomolePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromMolesPerHour(double molesperhour) => new MolarFlow(molesperhour, MolarFlowUnit.MolePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromMolesPerMinute(double molesperminute) => new MolarFlow(molesperminute, MolarFlowUnit.MolePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromMolesPerSecond(double molespersecond) => new MolarFlow(molespersecond, MolarFlowUnit.MolePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromPoundMolesPerHour(double poundmolesperhour) => new MolarFlow(poundmolesperhour, MolarFlowUnit.PoundMolePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromPoundMolesPerMinute(double poundmolesperminute) => new MolarFlow(poundmolesperminute, MolarFlowUnit.PoundMolePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarFlow FromPoundMolesPerSecond(double poundmolespersecond) => new MolarFlow(poundmolespersecond, MolarFlowUnit.PoundMolePerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarMass.g.cs
index 3f3c782e74..aa84f95453 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarMass.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarMass.g.cs
@@ -51,7 +51,6 @@ public struct MolarMass
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public MolarMass(double value, MolarMassUnit unit)
{
_value = value;
@@ -151,79 +150,66 @@ public MolarMass(double value, MolarMassUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromCentigramsPerMole(double centigramspermole) => new MolarMass(centigramspermole, MolarMassUnit.CentigramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromDecagramsPerMole(double decagramspermole) => new MolarMass(decagramspermole, MolarMassUnit.DecagramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromDecigramsPerMole(double decigramspermole) => new MolarMass(decigramspermole, MolarMassUnit.DecigramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromGramsPerMole(double gramspermole) => new MolarMass(gramspermole, MolarMassUnit.GramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromHectogramsPerMole(double hectogramspermole) => new MolarMass(hectogramspermole, MolarMassUnit.HectogramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromKilogramsPerKilomole(double kilogramsperkilomole) => new MolarMass(kilogramsperkilomole, MolarMassUnit.KilogramPerKilomole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromKilogramsPerMole(double kilogramspermole) => new MolarMass(kilogramspermole, MolarMassUnit.KilogramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromKilopoundsPerMole(double kilopoundspermole) => new MolarMass(kilopoundspermole, MolarMassUnit.KilopoundPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromMegapoundsPerMole(double megapoundspermole) => new MolarMass(megapoundspermole, MolarMassUnit.MegapoundPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromMicrogramsPerMole(double microgramspermole) => new MolarMass(microgramspermole, MolarMassUnit.MicrogramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromMilligramsPerMole(double milligramspermole) => new MolarMass(milligramspermole, MolarMassUnit.MilligramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromNanogramsPerMole(double nanogramspermole) => new MolarMass(nanogramspermole, MolarMassUnit.NanogramPerMole);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static MolarMass FromPoundsPerMole(double poundspermole) => new MolarMass(poundspermole, MolarMassUnit.PoundPerMole);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molarity.g.cs
index 3cde6200a7..a1562277a7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molarity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Molarity.g.cs
@@ -54,7 +54,6 @@ public struct Molarity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Molarity(double value, MolarityUnit unit)
{
_value = value;
@@ -144,67 +143,56 @@ public Molarity(double value, MolarityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromCentimolesPerLiter(double centimolesperliter) => new Molarity(centimolesperliter, MolarityUnit.CentimolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromDecimolesPerLiter(double decimolesperliter) => new Molarity(decimolesperliter, MolarityUnit.DecimolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromFemtomolesPerLiter(double femtomolesperliter) => new Molarity(femtomolesperliter, MolarityUnit.FemtomolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromKilomolesPerCubicMeter(double kilomolespercubicmeter) => new Molarity(kilomolespercubicmeter, MolarityUnit.KilomolePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromMicromolesPerLiter(double micromolesperliter) => new Molarity(micromolesperliter, MolarityUnit.MicromolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromMillimolesPerLiter(double millimolesperliter) => new Molarity(millimolesperliter, MolarityUnit.MillimolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromMolesPerCubicMeter(double molespercubicmeter) => new Molarity(molespercubicmeter, MolarityUnit.MolePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromMolesPerLiter(double molesperliter) => new Molarity(molesperliter, MolarityUnit.MolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromNanomolesPerLiter(double nanomolesperliter) => new Molarity(nanomolesperliter, MolarityUnit.NanomolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromPicomolesPerLiter(double picomolesperliter) => new Molarity(picomolesperliter, MolarityUnit.PicomolePerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Molarity FromPoundMolesPerCubicFoot(double poundmolespercubicfoot) => new Molarity(poundmolespercubicfoot, MolarityUnit.PoundMolePerCubicFoot);
///
@@ -257,7 +245,7 @@ private double GetValueInBaseUnit()
MolarityUnit.MolePerLiter => _value / 1e-3,
MolarityUnit.NanomolePerLiter => (_value / 1e-3) * 1e-9d,
MolarityUnit.PicomolePerLiter => (_value / 1e-3) * 1e-12d,
- MolarityUnit.PoundMolePerCubicFoot => _value / 6.2427960576144611956325455827221e-5,
+ MolarityUnit.PoundMolePerCubicFoot => _value * 1000 * 0.45359237 / 0.028316846592,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -281,7 +269,7 @@ private double GetValueAs(MolarityUnit unit)
MolarityUnit.MolePerLiter => baseUnitValue * 1e-3,
MolarityUnit.NanomolePerLiter => (baseUnitValue * 1e-3) / 1e-9d,
MolarityUnit.PicomolePerLiter => (baseUnitValue * 1e-3) / 1e-12d,
- MolarityUnit.PoundMolePerCubicFoot => baseUnitValue * 6.2427960576144611956325455827221e-5,
+ MolarityUnit.PoundMolePerCubicFoot => baseUnitValue / (1000 * 0.45359237 / 0.028316846592),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permeability.g.cs
index 24d98a8cca..77d0fb0b3f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permeability.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permeability.g.cs
@@ -54,7 +54,6 @@ public struct Permeability
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Permeability(double value, PermeabilityUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public Permeability(double value, PermeabilityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Permeability FromHenriesPerMeter(double henriespermeter) => new Permeability(henriespermeter, PermeabilityUnit.HenryPerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permittivity.g.cs
index 3a8892a8a7..a4a01ab2ae 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permittivity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Permittivity.g.cs
@@ -54,7 +54,6 @@ public struct Permittivity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Permittivity(double value, PermittivityUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public Permittivity(double value, PermittivityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Permittivity FromFaradsPerMeter(double faradspermeter) => new Permittivity(faradspermeter, PermittivityUnit.FaradPerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
index 44241c115c..e824a5c1fe 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PorousMediumPermeability.g.cs
@@ -54,7 +54,6 @@ public struct PorousMediumPermeability
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public PorousMediumPermeability(double value, PorousMediumPermeabilityUnit unit)
{
_value = value;
@@ -114,31 +113,26 @@ public PorousMediumPermeability(double value, PorousMediumPermeabilityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PorousMediumPermeability FromDarcys(double darcys) => new PorousMediumPermeability(darcys, PorousMediumPermeabilityUnit.Darcy);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PorousMediumPermeability FromMicrodarcys(double microdarcys) => new PorousMediumPermeability(microdarcys, PorousMediumPermeabilityUnit.Microdarcy);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PorousMediumPermeability FromMillidarcys(double millidarcys) => new PorousMediumPermeability(millidarcys, PorousMediumPermeabilityUnit.Millidarcy);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PorousMediumPermeability FromSquareCentimeters(double squarecentimeters) => new PorousMediumPermeability(squarecentimeters, PorousMediumPermeabilityUnit.SquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PorousMediumPermeability FromSquareMeters(double squaremeters) => new PorousMediumPermeability(squaremeters, PorousMediumPermeabilityUnit.SquareMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Power.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Power.g.cs
index 911f4cd7b9..1320540aeb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Power.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Power.g.cs
@@ -51,7 +51,6 @@ public struct Power
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Power(double value, PowerUnit unit)
{
_value = value;
@@ -66,12 +65,12 @@ public Power(double value, PowerUnit unit)
///
/// Represents the largest possible value of Power.
///
- public static Power MaxValue { get; } = new Power(79228162514264337593543950335d, BaseUnit);
+ public static Power MaxValue { get; } = new Power(double.MaxValue, BaseUnit);
///
/// Represents the smallest possible value of Power.
///
- public static Power MinValue { get; } = new Power(-79228162514264337593543950335d, BaseUnit);
+ public static Power MinValue { get; } = new Power(double.MinValue, BaseUnit);
///
/// Gets an instance of this quantity with a value of 0 in the base unit Second.
@@ -221,163 +220,136 @@ public Power(double value, PowerUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromBoilerHorsepower(double boilerhorsepower) => new Power(boilerhorsepower, PowerUnit.BoilerHorsepower);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromBritishThermalUnitsPerHour(double britishthermalunitsperhour) => new Power(britishthermalunitsperhour, PowerUnit.BritishThermalUnitPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromDecawatts(double decawatts) => new Power(decawatts, PowerUnit.Decawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromDeciwatts(double deciwatts) => new Power(deciwatts, PowerUnit.Deciwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromElectricalHorsepower(double electricalhorsepower) => new Power(electricalhorsepower, PowerUnit.ElectricalHorsepower);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromFemtowatts(double femtowatts) => new Power(femtowatts, PowerUnit.Femtowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromGigajoulesPerHour(double gigajoulesperhour) => new Power(gigajoulesperhour, PowerUnit.GigajoulePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromGigawatts(double gigawatts) => new Power(gigawatts, PowerUnit.Gigawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromHydraulicHorsepower(double hydraulichorsepower) => new Power(hydraulichorsepower, PowerUnit.HydraulicHorsepower);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromJoulesPerHour(double joulesperhour) => new Power(joulesperhour, PowerUnit.JoulePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromKilobritishThermalUnitsPerHour(double kilobritishthermalunitsperhour) => new Power(kilobritishthermalunitsperhour, PowerUnit.KilobritishThermalUnitPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromKilojoulesPerHour(double kilojoulesperhour) => new Power(kilojoulesperhour, PowerUnit.KilojoulePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromKilowatts(double kilowatts) => new Power(kilowatts, PowerUnit.Kilowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMechanicalHorsepower(double mechanicalhorsepower) => new Power(mechanicalhorsepower, PowerUnit.MechanicalHorsepower);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMegabritishThermalUnitsPerHour(double megabritishthermalunitsperhour) => new Power(megabritishthermalunitsperhour, PowerUnit.MegabritishThermalUnitPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMegajoulesPerHour(double megajoulesperhour) => new Power(megajoulesperhour, PowerUnit.MegajoulePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMegawatts(double megawatts) => new Power(megawatts, PowerUnit.Megawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMetricHorsepower(double metrichorsepower) => new Power(metrichorsepower, PowerUnit.MetricHorsepower);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMicrowatts(double microwatts) => new Power(microwatts, PowerUnit.Microwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMillijoulesPerHour(double millijoulesperhour) => new Power(millijoulesperhour, PowerUnit.MillijoulePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromMilliwatts(double milliwatts) => new Power(milliwatts, PowerUnit.Milliwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromNanowatts(double nanowatts) => new Power(nanowatts, PowerUnit.Nanowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromPetawatts(double petawatts) => new Power(petawatts, PowerUnit.Petawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromPicowatts(double picowatts) => new Power(picowatts, PowerUnit.Picowatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromTerawatts(double terawatts) => new Power(terawatts, PowerUnit.Terawatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromTonsOfRefrigeration(double tonsofrefrigeration) => new Power(tonsofrefrigeration, PowerUnit.TonOfRefrigeration);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Power FromWatts(double watts) => new Power(watts, PowerUnit.Watt);
///
@@ -420,32 +392,32 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- PowerUnit.BoilerHorsepower => _value * 9812.5d,
- PowerUnit.BritishThermalUnitPerHour => _value * 0.29307107017d,
+ PowerUnit.BoilerHorsepower => _value * 9812.5,
+ PowerUnit.BritishThermalUnitPerHour => _value * 1055.05585262 / 3600,
PowerUnit.Decawatt => (_value) * 1e1d,
PowerUnit.Deciwatt => (_value) * 1e-1d,
- PowerUnit.ElectricalHorsepower => _value * 746d,
+ PowerUnit.ElectricalHorsepower => _value * 746,
PowerUnit.Femtowatt => (_value) * 1e-15d,
- PowerUnit.GigajoulePerHour => (_value / 3600d) * 1e9d,
+ PowerUnit.GigajoulePerHour => (_value / 3600) * 1e9d,
PowerUnit.Gigawatt => (_value) * 1e9d,
- PowerUnit.HydraulicHorsepower => _value * 745.69988145d,
- PowerUnit.JoulePerHour => _value / 3600d,
- PowerUnit.KilobritishThermalUnitPerHour => (_value * 0.29307107017d) * 1e3d,
- PowerUnit.KilojoulePerHour => (_value / 3600d) * 1e3d,
+ PowerUnit.HydraulicHorsepower => _value * 745.69987158227022,
+ PowerUnit.JoulePerHour => _value / 3600,
+ PowerUnit.KilobritishThermalUnitPerHour => (_value * 1055.05585262 / 3600) * 1e3d,
+ PowerUnit.KilojoulePerHour => (_value / 3600) * 1e3d,
PowerUnit.Kilowatt => (_value) * 1e3d,
- PowerUnit.MechanicalHorsepower => _value * 745.69d,
- PowerUnit.MegabritishThermalUnitPerHour => (_value * 0.29307107017d) * 1e6d,
- PowerUnit.MegajoulePerHour => (_value / 3600d) * 1e6d,
+ PowerUnit.MechanicalHorsepower => _value * 76.0402249 * 9.80665,
+ PowerUnit.MegabritishThermalUnitPerHour => (_value * 1055.05585262 / 3600) * 1e6d,
+ PowerUnit.MegajoulePerHour => (_value / 3600) * 1e6d,
PowerUnit.Megawatt => (_value) * 1e6d,
- PowerUnit.MetricHorsepower => _value * 735.49875d,
+ PowerUnit.MetricHorsepower => _value * 75 * 9.80665,
PowerUnit.Microwatt => (_value) * 1e-6d,
- PowerUnit.MillijoulePerHour => (_value / 3600d) * 1e-3d,
+ PowerUnit.MillijoulePerHour => (_value / 3600) * 1e-3d,
PowerUnit.Milliwatt => (_value) * 1e-3d,
PowerUnit.Nanowatt => (_value) * 1e-9d,
PowerUnit.Petawatt => (_value) * 1e15d,
PowerUnit.Picowatt => (_value) * 1e-12d,
PowerUnit.Terawatt => (_value) * 1e12d,
- PowerUnit.TonOfRefrigeration => _value * 3516.853d,
+ PowerUnit.TonOfRefrigeration => _value * 3516.853,
PowerUnit.Watt => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -460,32 +432,32 @@ private double GetValueAs(PowerUnit unit)
return unit switch
{
- PowerUnit.BoilerHorsepower => baseUnitValue / 9812.5d,
- PowerUnit.BritishThermalUnitPerHour => baseUnitValue / 0.29307107017d,
+ PowerUnit.BoilerHorsepower => baseUnitValue / 9812.5,
+ PowerUnit.BritishThermalUnitPerHour => baseUnitValue * 3600 / 1055.05585262,
PowerUnit.Decawatt => (baseUnitValue) / 1e1d,
PowerUnit.Deciwatt => (baseUnitValue) / 1e-1d,
- PowerUnit.ElectricalHorsepower => baseUnitValue / 746d,
+ PowerUnit.ElectricalHorsepower => baseUnitValue / 746,
PowerUnit.Femtowatt => (baseUnitValue) / 1e-15d,
- PowerUnit.GigajoulePerHour => (baseUnitValue * 3600d) / 1e9d,
+ PowerUnit.GigajoulePerHour => (baseUnitValue * 3600) / 1e9d,
PowerUnit.Gigawatt => (baseUnitValue) / 1e9d,
- PowerUnit.HydraulicHorsepower => baseUnitValue / 745.69988145d,
- PowerUnit.JoulePerHour => baseUnitValue * 3600d,
- PowerUnit.KilobritishThermalUnitPerHour => (baseUnitValue / 0.29307107017d) / 1e3d,
- PowerUnit.KilojoulePerHour => (baseUnitValue * 3600d) / 1e3d,
+ PowerUnit.HydraulicHorsepower => baseUnitValue / 745.69987158227022,
+ PowerUnit.JoulePerHour => baseUnitValue * 3600,
+ PowerUnit.KilobritishThermalUnitPerHour => (baseUnitValue * 3600 / 1055.05585262) / 1e3d,
+ PowerUnit.KilojoulePerHour => (baseUnitValue * 3600) / 1e3d,
PowerUnit.Kilowatt => (baseUnitValue) / 1e3d,
- PowerUnit.MechanicalHorsepower => baseUnitValue / 745.69d,
- PowerUnit.MegabritishThermalUnitPerHour => (baseUnitValue / 0.29307107017d) / 1e6d,
- PowerUnit.MegajoulePerHour => (baseUnitValue * 3600d) / 1e6d,
+ PowerUnit.MechanicalHorsepower => baseUnitValue / (76.0402249 * 9.80665),
+ PowerUnit.MegabritishThermalUnitPerHour => (baseUnitValue * 3600 / 1055.05585262) / 1e6d,
+ PowerUnit.MegajoulePerHour => (baseUnitValue * 3600) / 1e6d,
PowerUnit.Megawatt => (baseUnitValue) / 1e6d,
- PowerUnit.MetricHorsepower => baseUnitValue / 735.49875d,
+ PowerUnit.MetricHorsepower => baseUnitValue / (75 * 9.80665),
PowerUnit.Microwatt => (baseUnitValue) / 1e-6d,
- PowerUnit.MillijoulePerHour => (baseUnitValue * 3600d) / 1e-3d,
+ PowerUnit.MillijoulePerHour => (baseUnitValue * 3600) / 1e-3d,
PowerUnit.Milliwatt => (baseUnitValue) / 1e-3d,
PowerUnit.Nanowatt => (baseUnitValue) / 1e-9d,
PowerUnit.Petawatt => (baseUnitValue) / 1e15d,
PowerUnit.Picowatt => (baseUnitValue) / 1e-12d,
PowerUnit.Terawatt => (baseUnitValue) / 1e12d,
- PowerUnit.TonOfRefrigeration => baseUnitValue / 3516.853d,
+ PowerUnit.TonOfRefrigeration => baseUnitValue / 3516.853,
PowerUnit.Watt => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerDensity.g.cs
index ad762ed535..90e7b6e651 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerDensity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerDensity.g.cs
@@ -51,7 +51,6 @@ public struct PowerDensity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public PowerDensity(double value, PowerDensityUnit unit)
{
_value = value;
@@ -306,265 +305,221 @@ public PowerDensity(double value, PowerDensityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDecawattsPerCubicFoot(double decawattspercubicfoot) => new PowerDensity(decawattspercubicfoot, PowerDensityUnit.DecawattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDecawattsPerCubicInch(double decawattspercubicinch) => new PowerDensity(decawattspercubicinch, PowerDensityUnit.DecawattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDecawattsPerCubicMeter(double decawattspercubicmeter) => new PowerDensity(decawattspercubicmeter, PowerDensityUnit.DecawattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDecawattsPerLiter(double decawattsperliter) => new PowerDensity(decawattsperliter, PowerDensityUnit.DecawattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDeciwattsPerCubicFoot(double deciwattspercubicfoot) => new PowerDensity(deciwattspercubicfoot, PowerDensityUnit.DeciwattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDeciwattsPerCubicInch(double deciwattspercubicinch) => new PowerDensity(deciwattspercubicinch, PowerDensityUnit.DeciwattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDeciwattsPerCubicMeter(double deciwattspercubicmeter) => new PowerDensity(deciwattspercubicmeter, PowerDensityUnit.DeciwattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromDeciwattsPerLiter(double deciwattsperliter) => new PowerDensity(deciwattsperliter, PowerDensityUnit.DeciwattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromGigawattsPerCubicFoot(double gigawattspercubicfoot) => new PowerDensity(gigawattspercubicfoot, PowerDensityUnit.GigawattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromGigawattsPerCubicInch(double gigawattspercubicinch) => new PowerDensity(gigawattspercubicinch, PowerDensityUnit.GigawattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromGigawattsPerCubicMeter(double gigawattspercubicmeter) => new PowerDensity(gigawattspercubicmeter, PowerDensityUnit.GigawattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromGigawattsPerLiter(double gigawattsperliter) => new PowerDensity(gigawattsperliter, PowerDensityUnit.GigawattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromKilowattsPerCubicFoot(double kilowattspercubicfoot) => new PowerDensity(kilowattspercubicfoot, PowerDensityUnit.KilowattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromKilowattsPerCubicInch(double kilowattspercubicinch) => new PowerDensity(kilowattspercubicinch, PowerDensityUnit.KilowattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromKilowattsPerCubicMeter(double kilowattspercubicmeter) => new PowerDensity(kilowattspercubicmeter, PowerDensityUnit.KilowattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromKilowattsPerLiter(double kilowattsperliter) => new PowerDensity(kilowattsperliter, PowerDensityUnit.KilowattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMegawattsPerCubicFoot(double megawattspercubicfoot) => new PowerDensity(megawattspercubicfoot, PowerDensityUnit.MegawattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMegawattsPerCubicInch(double megawattspercubicinch) => new PowerDensity(megawattspercubicinch, PowerDensityUnit.MegawattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMegawattsPerCubicMeter(double megawattspercubicmeter) => new PowerDensity(megawattspercubicmeter, PowerDensityUnit.MegawattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMegawattsPerLiter(double megawattsperliter) => new PowerDensity(megawattsperliter, PowerDensityUnit.MegawattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMicrowattsPerCubicFoot(double microwattspercubicfoot) => new PowerDensity(microwattspercubicfoot, PowerDensityUnit.MicrowattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMicrowattsPerCubicInch(double microwattspercubicinch) => new PowerDensity(microwattspercubicinch, PowerDensityUnit.MicrowattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMicrowattsPerCubicMeter(double microwattspercubicmeter) => new PowerDensity(microwattspercubicmeter, PowerDensityUnit.MicrowattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMicrowattsPerLiter(double microwattsperliter) => new PowerDensity(microwattsperliter, PowerDensityUnit.MicrowattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMilliwattsPerCubicFoot(double milliwattspercubicfoot) => new PowerDensity(milliwattspercubicfoot, PowerDensityUnit.MilliwattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMilliwattsPerCubicInch(double milliwattspercubicinch) => new PowerDensity(milliwattspercubicinch, PowerDensityUnit.MilliwattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMilliwattsPerCubicMeter(double milliwattspercubicmeter) => new PowerDensity(milliwattspercubicmeter, PowerDensityUnit.MilliwattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromMilliwattsPerLiter(double milliwattsperliter) => new PowerDensity(milliwattsperliter, PowerDensityUnit.MilliwattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromNanowattsPerCubicFoot(double nanowattspercubicfoot) => new PowerDensity(nanowattspercubicfoot, PowerDensityUnit.NanowattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromNanowattsPerCubicInch(double nanowattspercubicinch) => new PowerDensity(nanowattspercubicinch, PowerDensityUnit.NanowattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromNanowattsPerCubicMeter(double nanowattspercubicmeter) => new PowerDensity(nanowattspercubicmeter, PowerDensityUnit.NanowattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromNanowattsPerLiter(double nanowattsperliter) => new PowerDensity(nanowattsperliter, PowerDensityUnit.NanowattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromPicowattsPerCubicFoot(double picowattspercubicfoot) => new PowerDensity(picowattspercubicfoot, PowerDensityUnit.PicowattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromPicowattsPerCubicInch(double picowattspercubicinch) => new PowerDensity(picowattspercubicinch, PowerDensityUnit.PicowattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromPicowattsPerCubicMeter(double picowattspercubicmeter) => new PowerDensity(picowattspercubicmeter, PowerDensityUnit.PicowattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromPicowattsPerLiter(double picowattsperliter) => new PowerDensity(picowattsperliter, PowerDensityUnit.PicowattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromTerawattsPerCubicFoot(double terawattspercubicfoot) => new PowerDensity(terawattspercubicfoot, PowerDensityUnit.TerawattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromTerawattsPerCubicInch(double terawattspercubicinch) => new PowerDensity(terawattspercubicinch, PowerDensityUnit.TerawattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromTerawattsPerCubicMeter(double terawattspercubicmeter) => new PowerDensity(terawattspercubicmeter, PowerDensityUnit.TerawattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromTerawattsPerLiter(double terawattsperliter) => new PowerDensity(terawattsperliter, PowerDensityUnit.TerawattPerLiter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromWattsPerCubicFoot(double wattspercubicfoot) => new PowerDensity(wattspercubicfoot, PowerDensityUnit.WattPerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromWattsPerCubicInch(double wattspercubicinch) => new PowerDensity(wattspercubicinch, PowerDensityUnit.WattPerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromWattsPerCubicMeter(double wattspercubicmeter) => new PowerDensity(wattspercubicmeter, PowerDensityUnit.WattPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerDensity FromWattsPerLiter(double wattsperliter) => new PowerDensity(wattsperliter, PowerDensityUnit.WattPerLiter);
///
@@ -607,48 +562,48 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- PowerDensityUnit.DecawattPerCubicFoot => (_value * 3.531466672148859e1) * 1e1d,
- PowerDensityUnit.DecawattPerCubicInch => (_value * 6.102374409473228e4) * 1e1d,
+ PowerDensityUnit.DecawattPerCubicFoot => (_value / 0.028316846592) * 1e1d,
+ PowerDensityUnit.DecawattPerCubicInch => (_value / 1.6387064e-5) * 1e1d,
PowerDensityUnit.DecawattPerCubicMeter => (_value) * 1e1d,
PowerDensityUnit.DecawattPerLiter => (_value * 1.0e3) * 1e1d,
- PowerDensityUnit.DeciwattPerCubicFoot => (_value * 3.531466672148859e1) * 1e-1d,
- PowerDensityUnit.DeciwattPerCubicInch => (_value * 6.102374409473228e4) * 1e-1d,
+ PowerDensityUnit.DeciwattPerCubicFoot => (_value / 0.028316846592) * 1e-1d,
+ PowerDensityUnit.DeciwattPerCubicInch => (_value / 1.6387064e-5) * 1e-1d,
PowerDensityUnit.DeciwattPerCubicMeter => (_value) * 1e-1d,
PowerDensityUnit.DeciwattPerLiter => (_value * 1.0e3) * 1e-1d,
- PowerDensityUnit.GigawattPerCubicFoot => (_value * 3.531466672148859e1) * 1e9d,
- PowerDensityUnit.GigawattPerCubicInch => (_value * 6.102374409473228e4) * 1e9d,
+ PowerDensityUnit.GigawattPerCubicFoot => (_value / 0.028316846592) * 1e9d,
+ PowerDensityUnit.GigawattPerCubicInch => (_value / 1.6387064e-5) * 1e9d,
PowerDensityUnit.GigawattPerCubicMeter => (_value) * 1e9d,
PowerDensityUnit.GigawattPerLiter => (_value * 1.0e3) * 1e9d,
- PowerDensityUnit.KilowattPerCubicFoot => (_value * 3.531466672148859e1) * 1e3d,
- PowerDensityUnit.KilowattPerCubicInch => (_value * 6.102374409473228e4) * 1e3d,
+ PowerDensityUnit.KilowattPerCubicFoot => (_value / 0.028316846592) * 1e3d,
+ PowerDensityUnit.KilowattPerCubicInch => (_value / 1.6387064e-5) * 1e3d,
PowerDensityUnit.KilowattPerCubicMeter => (_value) * 1e3d,
PowerDensityUnit.KilowattPerLiter => (_value * 1.0e3) * 1e3d,
- PowerDensityUnit.MegawattPerCubicFoot => (_value * 3.531466672148859e1) * 1e6d,
- PowerDensityUnit.MegawattPerCubicInch => (_value * 6.102374409473228e4) * 1e6d,
+ PowerDensityUnit.MegawattPerCubicFoot => (_value / 0.028316846592) * 1e6d,
+ PowerDensityUnit.MegawattPerCubicInch => (_value / 1.6387064e-5) * 1e6d,
PowerDensityUnit.MegawattPerCubicMeter => (_value) * 1e6d,
PowerDensityUnit.MegawattPerLiter => (_value * 1.0e3) * 1e6d,
- PowerDensityUnit.MicrowattPerCubicFoot => (_value * 3.531466672148859e1) * 1e-6d,
- PowerDensityUnit.MicrowattPerCubicInch => (_value * 6.102374409473228e4) * 1e-6d,
+ PowerDensityUnit.MicrowattPerCubicFoot => (_value / 0.028316846592) * 1e-6d,
+ PowerDensityUnit.MicrowattPerCubicInch => (_value / 1.6387064e-5) * 1e-6d,
PowerDensityUnit.MicrowattPerCubicMeter => (_value) * 1e-6d,
PowerDensityUnit.MicrowattPerLiter => (_value * 1.0e3) * 1e-6d,
- PowerDensityUnit.MilliwattPerCubicFoot => (_value * 3.531466672148859e1) * 1e-3d,
- PowerDensityUnit.MilliwattPerCubicInch => (_value * 6.102374409473228e4) * 1e-3d,
+ PowerDensityUnit.MilliwattPerCubicFoot => (_value / 0.028316846592) * 1e-3d,
+ PowerDensityUnit.MilliwattPerCubicInch => (_value / 1.6387064e-5) * 1e-3d,
PowerDensityUnit.MilliwattPerCubicMeter => (_value) * 1e-3d,
PowerDensityUnit.MilliwattPerLiter => (_value * 1.0e3) * 1e-3d,
- PowerDensityUnit.NanowattPerCubicFoot => (_value * 3.531466672148859e1) * 1e-9d,
- PowerDensityUnit.NanowattPerCubicInch => (_value * 6.102374409473228e4) * 1e-9d,
+ PowerDensityUnit.NanowattPerCubicFoot => (_value / 0.028316846592) * 1e-9d,
+ PowerDensityUnit.NanowattPerCubicInch => (_value / 1.6387064e-5) * 1e-9d,
PowerDensityUnit.NanowattPerCubicMeter => (_value) * 1e-9d,
PowerDensityUnit.NanowattPerLiter => (_value * 1.0e3) * 1e-9d,
- PowerDensityUnit.PicowattPerCubicFoot => (_value * 3.531466672148859e1) * 1e-12d,
- PowerDensityUnit.PicowattPerCubicInch => (_value * 6.102374409473228e4) * 1e-12d,
+ PowerDensityUnit.PicowattPerCubicFoot => (_value / 0.028316846592) * 1e-12d,
+ PowerDensityUnit.PicowattPerCubicInch => (_value / 1.6387064e-5) * 1e-12d,
PowerDensityUnit.PicowattPerCubicMeter => (_value) * 1e-12d,
PowerDensityUnit.PicowattPerLiter => (_value * 1.0e3) * 1e-12d,
- PowerDensityUnit.TerawattPerCubicFoot => (_value * 3.531466672148859e1) * 1e12d,
- PowerDensityUnit.TerawattPerCubicInch => (_value * 6.102374409473228e4) * 1e12d,
+ PowerDensityUnit.TerawattPerCubicFoot => (_value / 0.028316846592) * 1e12d,
+ PowerDensityUnit.TerawattPerCubicInch => (_value / 1.6387064e-5) * 1e12d,
PowerDensityUnit.TerawattPerCubicMeter => (_value) * 1e12d,
PowerDensityUnit.TerawattPerLiter => (_value * 1.0e3) * 1e12d,
- PowerDensityUnit.WattPerCubicFoot => _value * 3.531466672148859e1,
- PowerDensityUnit.WattPerCubicInch => _value * 6.102374409473228e4,
+ PowerDensityUnit.WattPerCubicFoot => _value / 0.028316846592,
+ PowerDensityUnit.WattPerCubicInch => _value / 1.6387064e-5,
PowerDensityUnit.WattPerCubicMeter => _value,
PowerDensityUnit.WattPerLiter => _value * 1.0e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -664,48 +619,48 @@ private double GetValueAs(PowerDensityUnit unit)
return unit switch
{
- PowerDensityUnit.DecawattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e1d,
- PowerDensityUnit.DecawattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e1d,
+ PowerDensityUnit.DecawattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e1d,
+ PowerDensityUnit.DecawattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e1d,
PowerDensityUnit.DecawattPerCubicMeter => (baseUnitValue) / 1e1d,
PowerDensityUnit.DecawattPerLiter => (baseUnitValue / 1.0e3) / 1e1d,
- PowerDensityUnit.DeciwattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e-1d,
- PowerDensityUnit.DeciwattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e-1d,
+ PowerDensityUnit.DeciwattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e-1d,
+ PowerDensityUnit.DeciwattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e-1d,
PowerDensityUnit.DeciwattPerCubicMeter => (baseUnitValue) / 1e-1d,
PowerDensityUnit.DeciwattPerLiter => (baseUnitValue / 1.0e3) / 1e-1d,
- PowerDensityUnit.GigawattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e9d,
- PowerDensityUnit.GigawattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e9d,
+ PowerDensityUnit.GigawattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e9d,
+ PowerDensityUnit.GigawattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e9d,
PowerDensityUnit.GigawattPerCubicMeter => (baseUnitValue) / 1e9d,
PowerDensityUnit.GigawattPerLiter => (baseUnitValue / 1.0e3) / 1e9d,
- PowerDensityUnit.KilowattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e3d,
- PowerDensityUnit.KilowattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e3d,
+ PowerDensityUnit.KilowattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e3d,
+ PowerDensityUnit.KilowattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e3d,
PowerDensityUnit.KilowattPerCubicMeter => (baseUnitValue) / 1e3d,
PowerDensityUnit.KilowattPerLiter => (baseUnitValue / 1.0e3) / 1e3d,
- PowerDensityUnit.MegawattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e6d,
- PowerDensityUnit.MegawattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e6d,
+ PowerDensityUnit.MegawattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e6d,
+ PowerDensityUnit.MegawattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e6d,
PowerDensityUnit.MegawattPerCubicMeter => (baseUnitValue) / 1e6d,
PowerDensityUnit.MegawattPerLiter => (baseUnitValue / 1.0e3) / 1e6d,
- PowerDensityUnit.MicrowattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e-6d,
- PowerDensityUnit.MicrowattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e-6d,
+ PowerDensityUnit.MicrowattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e-6d,
+ PowerDensityUnit.MicrowattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e-6d,
PowerDensityUnit.MicrowattPerCubicMeter => (baseUnitValue) / 1e-6d,
PowerDensityUnit.MicrowattPerLiter => (baseUnitValue / 1.0e3) / 1e-6d,
- PowerDensityUnit.MilliwattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e-3d,
- PowerDensityUnit.MilliwattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e-3d,
+ PowerDensityUnit.MilliwattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e-3d,
+ PowerDensityUnit.MilliwattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e-3d,
PowerDensityUnit.MilliwattPerCubicMeter => (baseUnitValue) / 1e-3d,
PowerDensityUnit.MilliwattPerLiter => (baseUnitValue / 1.0e3) / 1e-3d,
- PowerDensityUnit.NanowattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e-9d,
- PowerDensityUnit.NanowattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e-9d,
+ PowerDensityUnit.NanowattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e-9d,
+ PowerDensityUnit.NanowattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e-9d,
PowerDensityUnit.NanowattPerCubicMeter => (baseUnitValue) / 1e-9d,
PowerDensityUnit.NanowattPerLiter => (baseUnitValue / 1.0e3) / 1e-9d,
- PowerDensityUnit.PicowattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e-12d,
- PowerDensityUnit.PicowattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e-12d,
+ PowerDensityUnit.PicowattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e-12d,
+ PowerDensityUnit.PicowattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e-12d,
PowerDensityUnit.PicowattPerCubicMeter => (baseUnitValue) / 1e-12d,
PowerDensityUnit.PicowattPerLiter => (baseUnitValue / 1.0e3) / 1e-12d,
- PowerDensityUnit.TerawattPerCubicFoot => (baseUnitValue / 3.531466672148859e1) / 1e12d,
- PowerDensityUnit.TerawattPerCubicInch => (baseUnitValue / 6.102374409473228e4) / 1e12d,
+ PowerDensityUnit.TerawattPerCubicFoot => (baseUnitValue * 0.028316846592) / 1e12d,
+ PowerDensityUnit.TerawattPerCubicInch => (baseUnitValue * 1.6387064e-5) / 1e12d,
PowerDensityUnit.TerawattPerCubicMeter => (baseUnitValue) / 1e12d,
PowerDensityUnit.TerawattPerLiter => (baseUnitValue / 1.0e3) / 1e12d,
- PowerDensityUnit.WattPerCubicFoot => baseUnitValue / 3.531466672148859e1,
- PowerDensityUnit.WattPerCubicInch => baseUnitValue / 6.102374409473228e4,
+ PowerDensityUnit.WattPerCubicFoot => baseUnitValue * 0.028316846592,
+ PowerDensityUnit.WattPerCubicInch => baseUnitValue * 1.6387064e-5,
PowerDensityUnit.WattPerCubicMeter => baseUnitValue,
PowerDensityUnit.WattPerLiter => baseUnitValue / 1.0e3,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerRatio.g.cs
index 789173ec85..33e1538a02 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerRatio.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PowerRatio.g.cs
@@ -51,7 +51,6 @@ public struct PowerRatio
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public PowerRatio(double value, PowerRatioUnit unit)
{
_value = value;
@@ -96,13 +95,11 @@ public PowerRatio(double value, PowerRatioUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerRatio FromDecibelMilliwatts(double decibelmilliwatts) => new PowerRatio(decibelmilliwatts, PowerRatioUnit.DecibelMilliwatt);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PowerRatio FromDecibelWatts(double decibelwatts) => new PowerRatio(decibelwatts, PowerRatioUnit.DecibelWatt);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs
index 6b2d8b9d18..ac0c58b117 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs
@@ -51,7 +51,6 @@ public struct Pressure
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Pressure(double value, PressureUnit unit)
{
_value = value;
@@ -114,11 +113,6 @@ public Pressure(double value, PressureUnit unit)
///
public double DynesPerSquareCentimeter => As(PressureUnit.DynePerSquareCentimeter);
- ///
- /// Gets a value of this quantity converted into
- ///
- public double FeetOfElevation => As(PressureUnit.FootOfElevation);
-
///
/// Gets a value of this quantity converted into
///
@@ -214,11 +208,6 @@ public Pressure(double value, PressureUnit unit)
///
public double Megapascals => As(PressureUnit.Megapascal);
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MetersOfElevation => As(PressureUnit.MeterOfElevation);
-
///
/// Gets a value of this quantity converted into
///
@@ -331,295 +320,236 @@ public Pressure(double value, PressureUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromAtmospheres(double atmospheres) => new Pressure(atmospheres, PressureUnit.Atmosphere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromBars(double bars) => new Pressure(bars, PressureUnit.Bar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromCentibars(double centibars) => new Pressure(centibars, PressureUnit.Centibar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromCentimetersOfWaterColumn(double centimetersofwatercolumn) => new Pressure(centimetersofwatercolumn, PressureUnit.CentimeterOfWaterColumn);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromDecapascals(double decapascals) => new Pressure(decapascals, PressureUnit.Decapascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromDecibars(double decibars) => new Pressure(decibars, PressureUnit.Decibar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromDynesPerSquareCentimeter(double dynespersquarecentimeter) => new Pressure(dynespersquarecentimeter, PressureUnit.DynePerSquareCentimeter);
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Pressure FromFeetOfElevation(double feetofelevation) => new Pressure(feetofelevation, PressureUnit.FootOfElevation);
-
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromFeetOfHead(double feetofhead) => new Pressure(feetofhead, PressureUnit.FootOfHead);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromGigapascals(double gigapascals) => new Pressure(gigapascals, PressureUnit.Gigapascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromHectopascals(double hectopascals) => new Pressure(hectopascals, PressureUnit.Hectopascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromInchesOfMercury(double inchesofmercury) => new Pressure(inchesofmercury, PressureUnit.InchOfMercury);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromInchesOfWaterColumn(double inchesofwatercolumn) => new Pressure(inchesofwatercolumn, PressureUnit.InchOfWaterColumn);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilobars(double kilobars) => new Pressure(kilobars, PressureUnit.Kilobar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilogramsForcePerSquareCentimeter(double kilogramsforcepersquarecentimeter) => new Pressure(kilogramsforcepersquarecentimeter, PressureUnit.KilogramForcePerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilogramsForcePerSquareMeter(double kilogramsforcepersquaremeter) => new Pressure(kilogramsforcepersquaremeter, PressureUnit.KilogramForcePerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilogramsForcePerSquareMillimeter(double kilogramsforcepersquaremillimeter) => new Pressure(kilogramsforcepersquaremillimeter, PressureUnit.KilogramForcePerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilonewtonsPerSquareCentimeter(double kilonewtonspersquarecentimeter) => new Pressure(kilonewtonspersquarecentimeter, PressureUnit.KilonewtonPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilonewtonsPerSquareMeter(double kilonewtonspersquaremeter) => new Pressure(kilonewtonspersquaremeter, PressureUnit.KilonewtonPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilonewtonsPerSquareMillimeter(double kilonewtonspersquaremillimeter) => new Pressure(kilonewtonspersquaremillimeter, PressureUnit.KilonewtonPerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilopascals(double kilopascals) => new Pressure(kilopascals, PressureUnit.Kilopascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilopoundsForcePerSquareFoot(double kilopoundsforcepersquarefoot) => new Pressure(kilopoundsforcepersquarefoot, PressureUnit.KilopoundForcePerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilopoundsForcePerSquareInch(double kilopoundsforcepersquareinch) => new Pressure(kilopoundsforcepersquareinch, PressureUnit.KilopoundForcePerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromKilopoundsForcePerSquareMil(double kilopoundsforcepersquaremil) => new Pressure(kilopoundsforcepersquaremil, PressureUnit.KilopoundForcePerSquareMil);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMegabars(double megabars) => new Pressure(megabars, PressureUnit.Megabar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMeganewtonsPerSquareMeter(double meganewtonspersquaremeter) => new Pressure(meganewtonspersquaremeter, PressureUnit.MeganewtonPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMegapascals(double megapascals) => new Pressure(megapascals, PressureUnit.Megapascal);
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static Pressure FromMetersOfElevation(double metersofelevation) => new Pressure(metersofelevation, PressureUnit.MeterOfElevation);
-
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMetersOfHead(double metersofhead) => new Pressure(metersofhead, PressureUnit.MeterOfHead);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMetersOfWaterColumn(double metersofwatercolumn) => new Pressure(metersofwatercolumn, PressureUnit.MeterOfWaterColumn);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMicrobars(double microbars) => new Pressure(microbars, PressureUnit.Microbar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMicropascals(double micropascals) => new Pressure(micropascals, PressureUnit.Micropascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMillibars(double millibars) => new Pressure(millibars, PressureUnit.Millibar);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMillimetersOfMercury(double millimetersofmercury) => new Pressure(millimetersofmercury, PressureUnit.MillimeterOfMercury);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMillimetersOfWaterColumn(double millimetersofwatercolumn) => new Pressure(millimetersofwatercolumn, PressureUnit.MillimeterOfWaterColumn);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromMillipascals(double millipascals) => new Pressure(millipascals, PressureUnit.Millipascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromNewtonsPerSquareCentimeter(double newtonspersquarecentimeter) => new Pressure(newtonspersquarecentimeter, PressureUnit.NewtonPerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromNewtonsPerSquareMeter(double newtonspersquaremeter) => new Pressure(newtonspersquaremeter, PressureUnit.NewtonPerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromNewtonsPerSquareMillimeter(double newtonspersquaremillimeter) => new Pressure(newtonspersquaremillimeter, PressureUnit.NewtonPerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromPascals(double pascals) => new Pressure(pascals, PressureUnit.Pascal);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromPoundsForcePerSquareFoot(double poundsforcepersquarefoot) => new Pressure(poundsforcepersquarefoot, PressureUnit.PoundForcePerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromPoundsForcePerSquareInch(double poundsforcepersquareinch) => new Pressure(poundsforcepersquareinch, PressureUnit.PoundForcePerSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromPoundsForcePerSquareMil(double poundsforcepersquaremil) => new Pressure(poundsforcepersquaremil, PressureUnit.PoundForcePerSquareMil);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromPoundsPerInchSecondSquared(double poundsperinchsecondsquared) => new Pressure(poundsperinchsecondsquared, PressureUnit.PoundPerInchSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromTechnicalAtmospheres(double technicalatmospheres) => new Pressure(technicalatmospheres, PressureUnit.TechnicalAtmosphere);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromTonnesForcePerSquareCentimeter(double tonnesforcepersquarecentimeter) => new Pressure(tonnesforcepersquarecentimeter, PressureUnit.TonneForcePerSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromTonnesForcePerSquareMeter(double tonnesforcepersquaremeter) => new Pressure(tonnesforcepersquaremeter, PressureUnit.TonneForcePerSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromTonnesForcePerSquareMillimeter(double tonnesforcepersquaremillimeter) => new Pressure(tonnesforcepersquaremillimeter, PressureUnit.TonneForcePerSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Pressure FromTorrs(double torrs) => new Pressure(torrs, PressureUnit.Torr);
///
@@ -665,52 +595,50 @@ private double GetValueInBaseUnit()
PressureUnit.Atmosphere => _value * 1.01325 * 1e5,
PressureUnit.Bar => _value * 1e5,
PressureUnit.Centibar => (_value * 1e5) * 1e-2d,
- PressureUnit.CentimeterOfWaterColumn => (_value * 9.806650000000272e3) * 1e-2d,
+ PressureUnit.CentimeterOfWaterColumn => (_value * 9.80665e3) * 1e-2d,
PressureUnit.Decapascal => (_value) * 1e1d,
PressureUnit.Decibar => (_value * 1e5) * 1e-1d,
PressureUnit.DynePerSquareCentimeter => _value * 1.0e-1,
- PressureUnit.FootOfElevation => Math.Pow(1.0 - (_value / 145366.45), 5.2553026003237266401799415610351) * 101325.0,
- PressureUnit.FootOfHead => _value * 2989.0669,
+ PressureUnit.FootOfHead => _value * 9804.139432 * 0.3048,
PressureUnit.Gigapascal => (_value) * 1e9d,
PressureUnit.Hectopascal => (_value) * 1e2d,
- PressureUnit.InchOfMercury => _value / 2.95299830714159e-4,
- PressureUnit.InchOfWaterColumn => _value * 249.08890833333,
+ PressureUnit.InchOfMercury => _value * 2.54e1 * 133.322387415,
+ PressureUnit.InchOfWaterColumn => _value * 2.54e-2 * 9.80665e3,
PressureUnit.Kilobar => (_value * 1e5) * 1e3d,
PressureUnit.KilogramForcePerSquareCentimeter => _value * 9.80665e4,
- PressureUnit.KilogramForcePerSquareMeter => _value * 9.80665019960652,
+ PressureUnit.KilogramForcePerSquareMeter => _value * 9.80665,
PressureUnit.KilogramForcePerSquareMillimeter => _value * 9.80665e6,
PressureUnit.KilonewtonPerSquareCentimeter => (_value * 1e4) * 1e3d,
PressureUnit.KilonewtonPerSquareMeter => (_value) * 1e3d,
PressureUnit.KilonewtonPerSquareMillimeter => (_value * 1e6) * 1e3d,
PressureUnit.Kilopascal => (_value) * 1e3d,
- PressureUnit.KilopoundForcePerSquareFoot => (_value * 4.788025898033584e1) * 1e3d,
- PressureUnit.KilopoundForcePerSquareInch => (_value * 6.894757293168361e3) * 1e3d,
- PressureUnit.KilopoundForcePerSquareMil => (_value * 6.894757293168361e9) * 1e3d,
+ PressureUnit.KilopoundForcePerSquareFoot => (_value * 4.4482216152605 / 9.290304e-2) * 1e3d,
+ PressureUnit.KilopoundForcePerSquareInch => (_value * 4.4482216152605 / 0.00064516) * 1e3d,
+ PressureUnit.KilopoundForcePerSquareMil => (_value * 4.4482216152605 / (2.54e-5 * 2.54e-5)) * 1e3d,
PressureUnit.Megabar => (_value * 1e5) * 1e6d,
PressureUnit.MeganewtonPerSquareMeter => (_value) * 1e6d,
PressureUnit.Megapascal => (_value) * 1e6d,
- PressureUnit.MeterOfElevation => Math.Pow(1.0 - (_value / 44307.69396), 5.2553026003237266401799415610351) * 101325.0,
PressureUnit.MeterOfHead => _value * 9804.139432,
- PressureUnit.MeterOfWaterColumn => _value * 9.806650000000272e3,
+ PressureUnit.MeterOfWaterColumn => _value * 9.80665e3,
PressureUnit.Microbar => (_value * 1e5) * 1e-6d,
PressureUnit.Micropascal => (_value) * 1e-6d,
PressureUnit.Millibar => (_value * 1e5) * 1e-3d,
- PressureUnit.MillimeterOfMercury => _value / 7.50061561302643e-3,
- PressureUnit.MillimeterOfWaterColumn => (_value * 9.806650000000272e3) * 1e-3d,
+ PressureUnit.MillimeterOfMercury => _value * 133.322387415,
+ PressureUnit.MillimeterOfWaterColumn => (_value * 9.80665e3) * 1e-3d,
PressureUnit.Millipascal => (_value) * 1e-3d,
PressureUnit.NewtonPerSquareCentimeter => _value * 1e4,
PressureUnit.NewtonPerSquareMeter => _value,
PressureUnit.NewtonPerSquareMillimeter => _value * 1e6,
PressureUnit.Pascal => _value,
- PressureUnit.PoundForcePerSquareFoot => _value * 4.788025898033584e1,
- PressureUnit.PoundForcePerSquareInch => _value * 6.894757293168361e3,
- PressureUnit.PoundForcePerSquareMil => _value * 6.894757293168361e9,
- PressureUnit.PoundPerInchSecondSquared => _value * 1.785796732283465e1,
- PressureUnit.TechnicalAtmosphere => _value * 9.80680592331 * 1e4,
+ PressureUnit.PoundForcePerSquareFoot => _value * 4.4482216152605 / 9.290304e-2,
+ PressureUnit.PoundForcePerSquareInch => _value * 4.4482216152605 / 0.00064516,
+ PressureUnit.PoundForcePerSquareMil => _value * 4.4482216152605 / (2.54e-5 * 2.54e-5),
+ PressureUnit.PoundPerInchSecondSquared => _value * (4.4482216152605 / 0.00064516) / 386.0886,
+ PressureUnit.TechnicalAtmosphere => _value * 9.80665e4,
PressureUnit.TonneForcePerSquareCentimeter => _value * 9.80665e7,
PressureUnit.TonneForcePerSquareMeter => _value * 9.80665e3,
PressureUnit.TonneForcePerSquareMillimeter => _value * 9.80665e9,
- PressureUnit.Torr => _value * 1.3332266752 * 1e2,
+ PressureUnit.Torr => _value * 101325 / 760,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -727,52 +655,50 @@ private double GetValueAs(PressureUnit unit)
PressureUnit.Atmosphere => baseUnitValue / (1.01325 * 1e5),
PressureUnit.Bar => baseUnitValue / 1e5,
PressureUnit.Centibar => (baseUnitValue / 1e5) / 1e-2d,
- PressureUnit.CentimeterOfWaterColumn => (baseUnitValue / 9.806650000000272e3) / 1e-2d,
+ PressureUnit.CentimeterOfWaterColumn => (baseUnitValue / 9.80665e3) / 1e-2d,
PressureUnit.Decapascal => (baseUnitValue) / 1e1d,
PressureUnit.Decibar => (baseUnitValue / 1e5) / 1e-1d,
PressureUnit.DynePerSquareCentimeter => baseUnitValue / 1.0e-1,
- PressureUnit.FootOfElevation => (1.0 - Math.Pow(baseUnitValue / 101325.0, 0.190284)) * 145366.45,
- PressureUnit.FootOfHead => baseUnitValue * 0.000334552565551,
+ PressureUnit.FootOfHead => baseUnitValue / (9804.139432 * 0.3048),
PressureUnit.Gigapascal => (baseUnitValue) / 1e9d,
PressureUnit.Hectopascal => (baseUnitValue) / 1e2d,
- PressureUnit.InchOfMercury => baseUnitValue * 2.95299830714159e-4,
- PressureUnit.InchOfWaterColumn => baseUnitValue / 249.08890833333,
+ PressureUnit.InchOfMercury => baseUnitValue / (2.54e1 * 133.322387415),
+ PressureUnit.InchOfWaterColumn => baseUnitValue / (2.54e-2 * 9.80665e3),
PressureUnit.Kilobar => (baseUnitValue / 1e5) / 1e3d,
PressureUnit.KilogramForcePerSquareCentimeter => baseUnitValue / 9.80665e4,
- PressureUnit.KilogramForcePerSquareMeter => baseUnitValue * 0.101971619222242,
+ PressureUnit.KilogramForcePerSquareMeter => baseUnitValue / 9.80665,
PressureUnit.KilogramForcePerSquareMillimeter => baseUnitValue / 9.80665e6,
PressureUnit.KilonewtonPerSquareCentimeter => (baseUnitValue / 1e4) / 1e3d,
PressureUnit.KilonewtonPerSquareMeter => (baseUnitValue) / 1e3d,
PressureUnit.KilonewtonPerSquareMillimeter => (baseUnitValue / 1e6) / 1e3d,
PressureUnit.Kilopascal => (baseUnitValue) / 1e3d,
- PressureUnit.KilopoundForcePerSquareFoot => (baseUnitValue / 4.788025898033584e1) / 1e3d,
- PressureUnit.KilopoundForcePerSquareInch => (baseUnitValue / 6.894757293168361e3) / 1e3d,
- PressureUnit.KilopoundForcePerSquareMil => (baseUnitValue / 6.894757293168361e9) / 1e3d,
+ PressureUnit.KilopoundForcePerSquareFoot => (baseUnitValue * 9.290304e-2 / 4.4482216152605) / 1e3d,
+ PressureUnit.KilopoundForcePerSquareInch => (baseUnitValue * 0.00064516 / 4.4482216152605) / 1e3d,
+ PressureUnit.KilopoundForcePerSquareMil => (baseUnitValue * (2.54e-5 * 2.54e-5) / 4.4482216152605) / 1e3d,
PressureUnit.Megabar => (baseUnitValue / 1e5) / 1e6d,
PressureUnit.MeganewtonPerSquareMeter => (baseUnitValue) / 1e6d,
PressureUnit.Megapascal => (baseUnitValue) / 1e6d,
- PressureUnit.MeterOfElevation => (1.0 - Math.Pow(baseUnitValue / 101325.0, 0.190284)) * 44307.69396,
- PressureUnit.MeterOfHead => baseUnitValue * 0.0001019977334,
- PressureUnit.MeterOfWaterColumn => baseUnitValue / 9.806650000000272e3,
+ PressureUnit.MeterOfHead => baseUnitValue / 9804.139432,
+ PressureUnit.MeterOfWaterColumn => baseUnitValue / 9.80665e3,
PressureUnit.Microbar => (baseUnitValue / 1e5) / 1e-6d,
PressureUnit.Micropascal => (baseUnitValue) / 1e-6d,
PressureUnit.Millibar => (baseUnitValue / 1e5) / 1e-3d,
- PressureUnit.MillimeterOfMercury => baseUnitValue * 7.50061561302643e-3,
- PressureUnit.MillimeterOfWaterColumn => (baseUnitValue / 9.806650000000272e3) / 1e-3d,
+ PressureUnit.MillimeterOfMercury => baseUnitValue / 133.322387415,
+ PressureUnit.MillimeterOfWaterColumn => (baseUnitValue / 9.80665e3) / 1e-3d,
PressureUnit.Millipascal => (baseUnitValue) / 1e-3d,
PressureUnit.NewtonPerSquareCentimeter => baseUnitValue / 1e4,
PressureUnit.NewtonPerSquareMeter => baseUnitValue,
PressureUnit.NewtonPerSquareMillimeter => baseUnitValue / 1e6,
PressureUnit.Pascal => baseUnitValue,
- PressureUnit.PoundForcePerSquareFoot => baseUnitValue / 4.788025898033584e1,
- PressureUnit.PoundForcePerSquareInch => baseUnitValue / 6.894757293168361e3,
- PressureUnit.PoundForcePerSquareMil => baseUnitValue / 6.894757293168361e9,
- PressureUnit.PoundPerInchSecondSquared => baseUnitValue / 1.785796732283465e1,
- PressureUnit.TechnicalAtmosphere => baseUnitValue / (9.80680592331 * 1e4),
+ PressureUnit.PoundForcePerSquareFoot => baseUnitValue * 9.290304e-2 / 4.4482216152605,
+ PressureUnit.PoundForcePerSquareInch => baseUnitValue * 0.00064516 / 4.4482216152605,
+ PressureUnit.PoundForcePerSquareMil => baseUnitValue * (2.54e-5 * 2.54e-5) / 4.4482216152605,
+ PressureUnit.PoundPerInchSecondSquared => baseUnitValue * 386.0886 / (4.4482216152605 / 0.00064516),
+ PressureUnit.TechnicalAtmosphere => baseUnitValue / 9.80665e4,
PressureUnit.TonneForcePerSquareCentimeter => baseUnitValue / 9.80665e7,
PressureUnit.TonneForcePerSquareMeter => baseUnitValue / 9.80665e3,
PressureUnit.TonneForcePerSquareMillimeter => baseUnitValue / 9.80665e9,
- PressureUnit.Torr => baseUnitValue / (1.3332266752 * 1e2),
+ PressureUnit.Torr => baseUnitValue * 760 / 101325,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PressureChangeRate.g.cs
index 7bfeba9904..2645980c42 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/PressureChangeRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/PressureChangeRate.g.cs
@@ -51,7 +51,6 @@ public struct PressureChangeRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public PressureChangeRate(double value, PressureChangeRateUnit unit)
{
_value = value;
@@ -176,109 +175,91 @@ public PressureChangeRate(double value, PressureChangeRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromAtmospheresPerSecond(double atmospherespersecond) => new PressureChangeRate(atmospherespersecond, PressureChangeRateUnit.AtmospherePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromBarsPerMinute(double barsperminute) => new PressureChangeRate(barsperminute, PressureChangeRateUnit.BarPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromBarsPerSecond(double barspersecond) => new PressureChangeRate(barspersecond, PressureChangeRateUnit.BarPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromKilopascalsPerMinute(double kilopascalsperminute) => new PressureChangeRate(kilopascalsperminute, PressureChangeRateUnit.KilopascalPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromKilopascalsPerSecond(double kilopascalspersecond) => new PressureChangeRate(kilopascalspersecond, PressureChangeRateUnit.KilopascalPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromKilopoundsForcePerSquareInchPerMinute(double kilopoundsforcepersquareinchperminute) => new PressureChangeRate(kilopoundsforcepersquareinchperminute, PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromKilopoundsForcePerSquareInchPerSecond(double kilopoundsforcepersquareinchpersecond) => new PressureChangeRate(kilopoundsforcepersquareinchpersecond, PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMegapascalsPerMinute(double megapascalsperminute) => new PressureChangeRate(megapascalsperminute, PressureChangeRateUnit.MegapascalPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMegapascalsPerSecond(double megapascalspersecond) => new PressureChangeRate(megapascalspersecond, PressureChangeRateUnit.MegapascalPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMegapoundsForcePerSquareInchPerMinute(double megapoundsforcepersquareinchperminute) => new PressureChangeRate(megapoundsforcepersquareinchperminute, PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMegapoundsForcePerSquareInchPerSecond(double megapoundsforcepersquareinchpersecond) => new PressureChangeRate(megapoundsforcepersquareinchpersecond, PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMillibarsPerMinute(double millibarsperminute) => new PressureChangeRate(millibarsperminute, PressureChangeRateUnit.MillibarPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMillibarsPerSecond(double millibarspersecond) => new PressureChangeRate(millibarspersecond, PressureChangeRateUnit.MillibarPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromMillimetersOfMercuryPerSecond(double millimetersofmercurypersecond) => new PressureChangeRate(millimetersofmercurypersecond, PressureChangeRateUnit.MillimeterOfMercuryPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromPascalsPerMinute(double pascalsperminute) => new PressureChangeRate(pascalsperminute, PressureChangeRateUnit.PascalPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromPascalsPerSecond(double pascalspersecond) => new PressureChangeRate(pascalspersecond, PressureChangeRateUnit.PascalPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromPoundsForcePerSquareInchPerMinute(double poundsforcepersquareinchperminute) => new PressureChangeRate(poundsforcepersquareinchperminute, PressureChangeRateUnit.PoundForcePerSquareInchPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static PressureChangeRate FromPoundsForcePerSquareInchPerSecond(double poundsforcepersquareinchpersecond) => new PressureChangeRate(poundsforcepersquareinchpersecond, PressureChangeRateUnit.PoundForcePerSquareInchPerSecond);
///
@@ -326,19 +307,19 @@ private double GetValueInBaseUnit()
PressureChangeRateUnit.BarPerSecond => _value * 1e5,
PressureChangeRateUnit.KilopascalPerMinute => (_value / 60) * 1e3d,
PressureChangeRateUnit.KilopascalPerSecond => (_value) * 1e3d,
- PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute => (_value * 6.894757293168361e3 / 60) * 1e3d,
- PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond => (_value * 6.894757293168361e3) * 1e3d,
+ PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute => (_value * (4.4482216152605 / 0.00064516) / 60) * 1e3d,
+ PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond => (_value * 4.4482216152605 / 0.00064516) * 1e3d,
PressureChangeRateUnit.MegapascalPerMinute => (_value / 60) * 1e6d,
PressureChangeRateUnit.MegapascalPerSecond => (_value) * 1e6d,
- PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute => (_value * 6.894757293168361e3 / 60) * 1e6d,
- PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond => (_value * 6.894757293168361e3) * 1e6d,
+ PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute => (_value * (4.4482216152605 / 0.00064516) / 60) * 1e6d,
+ PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond => (_value * 4.4482216152605 / 0.00064516) * 1e6d,
PressureChangeRateUnit.MillibarPerMinute => (_value * 1e5 / 60) * 1e-3d,
PressureChangeRateUnit.MillibarPerSecond => (_value * 1e5) * 1e-3d,
- PressureChangeRateUnit.MillimeterOfMercuryPerSecond => _value * 133.322,
+ PressureChangeRateUnit.MillimeterOfMercuryPerSecond => _value * 133.322387415,
PressureChangeRateUnit.PascalPerMinute => _value / 60,
PressureChangeRateUnit.PascalPerSecond => _value,
- PressureChangeRateUnit.PoundForcePerSquareInchPerMinute => _value * 6.894757293168361e3 / 60,
- PressureChangeRateUnit.PoundForcePerSquareInchPerSecond => _value * 6.894757293168361e3,
+ PressureChangeRateUnit.PoundForcePerSquareInchPerMinute => _value * (4.4482216152605 / 0.00064516) / 60,
+ PressureChangeRateUnit.PoundForcePerSquareInchPerSecond => _value * 4.4482216152605 / 0.00064516,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -357,19 +338,19 @@ private double GetValueAs(PressureChangeRateUnit unit)
PressureChangeRateUnit.BarPerSecond => baseUnitValue / 1e5,
PressureChangeRateUnit.KilopascalPerMinute => (baseUnitValue * 60) / 1e3d,
PressureChangeRateUnit.KilopascalPerSecond => (baseUnitValue) / 1e3d,
- PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute => (baseUnitValue / 6.894757293168361e3 * 60) / 1e3d,
- PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond => (baseUnitValue / 6.894757293168361e3) / 1e3d,
+ PressureChangeRateUnit.KilopoundForcePerSquareInchPerMinute => (baseUnitValue * 60 / (4.4482216152605 / 0.00064516)) / 1e3d,
+ PressureChangeRateUnit.KilopoundForcePerSquareInchPerSecond => (baseUnitValue * 0.00064516 / 4.4482216152605) / 1e3d,
PressureChangeRateUnit.MegapascalPerMinute => (baseUnitValue * 60) / 1e6d,
PressureChangeRateUnit.MegapascalPerSecond => (baseUnitValue) / 1e6d,
- PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute => (baseUnitValue / 6.894757293168361e3 * 60) / 1e6d,
- PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond => (baseUnitValue / 6.894757293168361e3) / 1e6d,
+ PressureChangeRateUnit.MegapoundForcePerSquareInchPerMinute => (baseUnitValue * 60 / (4.4482216152605 / 0.00064516)) / 1e6d,
+ PressureChangeRateUnit.MegapoundForcePerSquareInchPerSecond => (baseUnitValue * 0.00064516 / 4.4482216152605) / 1e6d,
PressureChangeRateUnit.MillibarPerMinute => (baseUnitValue / 1e5 * 60) / 1e-3d,
PressureChangeRateUnit.MillibarPerSecond => (baseUnitValue / 1e5) / 1e-3d,
- PressureChangeRateUnit.MillimeterOfMercuryPerSecond => baseUnitValue / 133.322,
+ PressureChangeRateUnit.MillimeterOfMercuryPerSecond => baseUnitValue / 133.322387415,
PressureChangeRateUnit.PascalPerMinute => baseUnitValue * 60,
PressureChangeRateUnit.PascalPerSecond => baseUnitValue,
- PressureChangeRateUnit.PoundForcePerSquareInchPerMinute => baseUnitValue / 6.894757293168361e3 * 60,
- PressureChangeRateUnit.PoundForcePerSquareInchPerSecond => baseUnitValue / 6.894757293168361e3,
+ PressureChangeRateUnit.PoundForcePerSquareInchPerMinute => baseUnitValue * 60 / (4.4482216152605 / 0.00064516),
+ PressureChangeRateUnit.PoundForcePerSquareInchPerSecond => baseUnitValue * 0.00064516 / 4.4482216152605,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
index 01bf3ca46e..7dad4629ec 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDose.g.cs
@@ -51,7 +51,6 @@ public struct RadiationEquivalentDose
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RadiationEquivalentDose(double value, RadiationEquivalentDoseUnit unit)
{
_value = value;
@@ -116,37 +115,31 @@ public RadiationEquivalentDose(double value, RadiationEquivalentDoseUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromMicrosieverts(double microsieverts) => new RadiationEquivalentDose(microsieverts, RadiationEquivalentDoseUnit.Microsievert);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromMilliroentgensEquivalentMan(double milliroentgensequivalentman) => new RadiationEquivalentDose(milliroentgensequivalentman, RadiationEquivalentDoseUnit.MilliroentgenEquivalentMan);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromMillisieverts(double millisieverts) => new RadiationEquivalentDose(millisieverts, RadiationEquivalentDoseUnit.Millisievert);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromNanosieverts(double nanosieverts) => new RadiationEquivalentDose(nanosieverts, RadiationEquivalentDoseUnit.Nanosievert);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromRoentgensEquivalentMan(double roentgensequivalentman) => new RadiationEquivalentDose(roentgensequivalentman, RadiationEquivalentDoseUnit.RoentgenEquivalentMan);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDose FromSieverts(double sieverts) => new RadiationEquivalentDose(sieverts, RadiationEquivalentDoseUnit.Sievert);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDoseRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDoseRate.g.cs
index 0071111627..67fcc7c51b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDoseRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationEquivalentDoseRate.g.cs
@@ -51,7 +51,6 @@ public struct RadiationEquivalentDoseRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RadiationEquivalentDoseRate(double value, RadiationEquivalentDoseRateUnit unit)
{
_value = value;
@@ -136,61 +135,51 @@ public RadiationEquivalentDoseRate(double value, RadiationEquivalentDoseRateUnit
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromMicrosievertsPerHour(double microsievertsperhour) => new RadiationEquivalentDoseRate(microsievertsperhour, RadiationEquivalentDoseRateUnit.MicrosievertPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromMicrosievertsPerSecond(double microsievertspersecond) => new RadiationEquivalentDoseRate(microsievertspersecond, RadiationEquivalentDoseRateUnit.MicrosievertPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromMilliroentgensEquivalentManPerHour(double milliroentgensequivalentmanperhour) => new RadiationEquivalentDoseRate(milliroentgensequivalentmanperhour, RadiationEquivalentDoseRateUnit.MilliroentgenEquivalentManPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromMillisievertsPerHour(double millisievertsperhour) => new RadiationEquivalentDoseRate(millisievertsperhour, RadiationEquivalentDoseRateUnit.MillisievertPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromMillisievertsPerSecond(double millisievertspersecond) => new RadiationEquivalentDoseRate(millisievertspersecond, RadiationEquivalentDoseRateUnit.MillisievertPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromNanosievertsPerHour(double nanosievertsperhour) => new RadiationEquivalentDoseRate(nanosievertsperhour, RadiationEquivalentDoseRateUnit.NanosievertPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromNanosievertsPerSecond(double nanosievertspersecond) => new RadiationEquivalentDoseRate(nanosievertspersecond, RadiationEquivalentDoseRateUnit.NanosievertPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromRoentgensEquivalentManPerHour(double roentgensequivalentmanperhour) => new RadiationEquivalentDoseRate(roentgensequivalentmanperhour, RadiationEquivalentDoseRateUnit.RoentgenEquivalentManPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromSievertsPerHour(double sievertsperhour) => new RadiationEquivalentDoseRate(sievertsperhour, RadiationEquivalentDoseRateUnit.SievertPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationEquivalentDoseRate FromSievertsPerSecond(double sievertspersecond) => new RadiationEquivalentDoseRate(sievertspersecond, RadiationEquivalentDoseRateUnit.SievertPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs
index 92d76ee0d6..c3903aef6f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RadiationExposure.g.cs
@@ -51,7 +51,6 @@ public struct RadiationExposure
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RadiationExposure(double value, RadiationExposureUnit unit)
{
_value = value;
@@ -126,49 +125,41 @@ public RadiationExposure(double value, RadiationExposureUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromCoulombsPerKilogram(double coulombsperkilogram) => new RadiationExposure(coulombsperkilogram, RadiationExposureUnit.CoulombPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromMicrocoulombsPerKilogram(double microcoulombsperkilogram) => new RadiationExposure(microcoulombsperkilogram, RadiationExposureUnit.MicrocoulombPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromMicroroentgens(double microroentgens) => new RadiationExposure(microroentgens, RadiationExposureUnit.Microroentgen);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromMillicoulombsPerKilogram(double millicoulombsperkilogram) => new RadiationExposure(millicoulombsperkilogram, RadiationExposureUnit.MillicoulombPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromMilliroentgens(double milliroentgens) => new RadiationExposure(milliroentgens, RadiationExposureUnit.Milliroentgen);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromNanocoulombsPerKilogram(double nanocoulombsperkilogram) => new RadiationExposure(nanocoulombsperkilogram, RadiationExposureUnit.NanocoulombPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromPicocoulombsPerKilogram(double picocoulombsperkilogram) => new RadiationExposure(picocoulombsperkilogram, RadiationExposureUnit.PicocoulombPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RadiationExposure FromRoentgens(double roentgens) => new RadiationExposure(roentgens, RadiationExposureUnit.Roentgen);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Radioactivity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Radioactivity.g.cs
index bebcf8158b..a58e1eb74f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Radioactivity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Radioactivity.g.cs
@@ -51,7 +51,6 @@ public struct Radioactivity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Radioactivity(double value, RadioactivityUnit unit)
{
_value = value;
@@ -231,175 +230,146 @@ public Radioactivity(double value, RadioactivityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromBecquerels(double becquerels) => new Radioactivity(becquerels, RadioactivityUnit.Becquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromCuries(double curies) => new Radioactivity(curies, RadioactivityUnit.Curie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromExabecquerels(double exabecquerels) => new Radioactivity(exabecquerels, RadioactivityUnit.Exabecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromGigabecquerels(double gigabecquerels) => new Radioactivity(gigabecquerels, RadioactivityUnit.Gigabecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromGigacuries(double gigacuries) => new Radioactivity(gigacuries, RadioactivityUnit.Gigacurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromGigarutherfords(double gigarutherfords) => new Radioactivity(gigarutherfords, RadioactivityUnit.Gigarutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromKilobecquerels(double kilobecquerels) => new Radioactivity(kilobecquerels, RadioactivityUnit.Kilobecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromKilocuries(double kilocuries) => new Radioactivity(kilocuries, RadioactivityUnit.Kilocurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromKilorutherfords(double kilorutherfords) => new Radioactivity(kilorutherfords, RadioactivityUnit.Kilorutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMegabecquerels(double megabecquerels) => new Radioactivity(megabecquerels, RadioactivityUnit.Megabecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMegacuries(double megacuries) => new Radioactivity(megacuries, RadioactivityUnit.Megacurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMegarutherfords(double megarutherfords) => new Radioactivity(megarutherfords, RadioactivityUnit.Megarutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMicrobecquerels(double microbecquerels) => new Radioactivity(microbecquerels, RadioactivityUnit.Microbecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMicrocuries(double microcuries) => new Radioactivity(microcuries, RadioactivityUnit.Microcurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMicrorutherfords(double microrutherfords) => new Radioactivity(microrutherfords, RadioactivityUnit.Microrutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMillibecquerels(double millibecquerels) => new Radioactivity(millibecquerels, RadioactivityUnit.Millibecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMillicuries(double millicuries) => new Radioactivity(millicuries, RadioactivityUnit.Millicurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromMillirutherfords(double millirutherfords) => new Radioactivity(millirutherfords, RadioactivityUnit.Millirutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromNanobecquerels(double nanobecquerels) => new Radioactivity(nanobecquerels, RadioactivityUnit.Nanobecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromNanocuries(double nanocuries) => new Radioactivity(nanocuries, RadioactivityUnit.Nanocurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromNanorutherfords(double nanorutherfords) => new Radioactivity(nanorutherfords, RadioactivityUnit.Nanorutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromPetabecquerels(double petabecquerels) => new Radioactivity(petabecquerels, RadioactivityUnit.Petabecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromPicobecquerels(double picobecquerels) => new Radioactivity(picobecquerels, RadioactivityUnit.Picobecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromPicocuries(double picocuries) => new Radioactivity(picocuries, RadioactivityUnit.Picocurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromPicorutherfords(double picorutherfords) => new Radioactivity(picorutherfords, RadioactivityUnit.Picorutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromRutherfords(double rutherfords) => new Radioactivity(rutherfords, RadioactivityUnit.Rutherford);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromTerabecquerels(double terabecquerels) => new Radioactivity(terabecquerels, RadioactivityUnit.Terabecquerel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromTeracuries(double teracuries) => new Radioactivity(teracuries, RadioactivityUnit.Teracurie);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Radioactivity FromTerarutherfords(double terarutherfords) => new Radioactivity(terarutherfords, RadioactivityUnit.Terarutherford);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Ratio.g.cs
index bbaf9cdbfb..17d7e36e80 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Ratio.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Ratio.g.cs
@@ -51,7 +51,6 @@ public struct Ratio
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Ratio(double value, RatioUnit unit)
{
_value = value;
@@ -116,37 +115,31 @@ public Ratio(double value, RatioUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromDecimalFractions(double decimalfractions) => new Ratio(decimalfractions, RatioUnit.DecimalFraction);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromPartsPerBillion(double partsperbillion) => new Ratio(partsperbillion, RatioUnit.PartPerBillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromPartsPerMillion(double partspermillion) => new Ratio(partspermillion, RatioUnit.PartPerMillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromPartsPerThousand(double partsperthousand) => new Ratio(partsperthousand, RatioUnit.PartPerThousand);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromPartsPerTrillion(double partspertrillion) => new Ratio(partspertrillion, RatioUnit.PartPerTrillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Ratio FromPercent(double percent) => new Ratio(percent, RatioUnit.Percent);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RatioChangeRate.g.cs
index def9f929de..cc958b20f8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RatioChangeRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RatioChangeRate.g.cs
@@ -51,7 +51,6 @@ public struct RatioChangeRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RatioChangeRate(double value, RatioChangeRateUnit unit)
{
_value = value;
@@ -96,13 +95,11 @@ public RatioChangeRate(double value, RatioChangeRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RatioChangeRate FromDecimalFractionsPerSecond(double decimalfractionspersecond) => new RatioChangeRate(decimalfractionspersecond, RatioChangeRateUnit.DecimalFractionPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RatioChangeRate FromPercentsPerSecond(double percentspersecond) => new RatioChangeRate(percentspersecond, RatioChangeRateUnit.PercentPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs
deleted file mode 100644
index e5038aede0..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactiveEnergy.g.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// The Volt-ampere reactive hour (expressed as varh) is the reactive power of one Volt-ampere reactive produced in one hour.
- ///
- ///
- /// ReactiveEnergy has been renamed to ElectricReactiveEnergy , and will be removed in a later major version.
- ///
- [Obsolete("ReactiveEnergy has been renamed to ElectricReactiveEnergy, and will be removed in a later major version.")]
- public struct ReactiveEnergy
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ReactiveEnergyUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ReactiveEnergyUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ReactiveEnergy(double value, ReactiveEnergyUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ReactiveEnergy, which is Second. All conversions go via this value.
- ///
- public static ReactiveEnergyUnit BaseUnit { get; } = ReactiveEnergyUnit.VoltampereReactiveHour;
-
- ///
- /// Represents the largest possible value of ReactiveEnergy.
- ///
- public static ReactiveEnergy MaxValue { get; } = new ReactiveEnergy(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ReactiveEnergy.
- ///
- public static ReactiveEnergy MinValue { get; } = new ReactiveEnergy(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ReactiveEnergy Zero { get; } = new ReactiveEnergy(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double KilovoltampereReactiveHours => As(ReactiveEnergyUnit.KilovoltampereReactiveHour);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MegavoltampereReactiveHours => As(ReactiveEnergyUnit.MegavoltampereReactiveHour);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double VoltampereReactiveHours => As(ReactiveEnergyUnit.VoltampereReactiveHour);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactiveEnergy FromKilovoltampereReactiveHours(double kilovoltamperereactivehours) => new ReactiveEnergy(kilovoltamperereactivehours, ReactiveEnergyUnit.KilovoltampereReactiveHour);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactiveEnergy FromMegavoltampereReactiveHours(double megavoltamperereactivehours) => new ReactiveEnergy(megavoltamperereactivehours, ReactiveEnergyUnit.MegavoltampereReactiveHour);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactiveEnergy FromVoltampereReactiveHours(double voltamperereactivehours) => new ReactiveEnergy(voltamperereactivehours, ReactiveEnergyUnit.VoltampereReactiveHour);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ReactiveEnergy unit value.
- public static ReactiveEnergy From(double value, ReactiveEnergyUnit fromUnit)
- {
- return new ReactiveEnergy(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ReactiveEnergyUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ReactiveEnergy to another ReactiveEnergy with the unit representation .
- ///
- /// A ReactiveEnergy with the specified unit.
- public ReactiveEnergy ToUnit(ReactiveEnergyUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ReactiveEnergy(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ReactiveEnergyUnit.KilovoltampereReactiveHour => (_value) * 1e3d,
- ReactiveEnergyUnit.MegavoltampereReactiveHour => (_value) * 1e6d,
- ReactiveEnergyUnit.VoltampereReactiveHour => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ReactiveEnergyUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ReactiveEnergyUnit.KilovoltampereReactiveHour => (baseUnitValue) / 1e3d,
- ReactiveEnergyUnit.MegavoltampereReactiveHour => (baseUnitValue) / 1e6d,
- ReactiveEnergyUnit.VoltampereReactiveHour => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs
deleted file mode 100644
index 7867e37e9e..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReactivePower.g.cs
+++ /dev/null
@@ -1,202 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// Volt-ampere reactive (var) is a unit by which reactive power is expressed in an AC electric power system. Reactive power exists in an AC circuit when the current and voltage are not in phase.
- ///
- ///
- /// ReactivePower has been renamed to ElectricReactivePower , and will be removed in a later major version.
- ///
- [Obsolete("ReactivePower has been renamed to ElectricReactivePower, and will be removed in a later major version.")]
- public struct ReactivePower
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ReactivePowerUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ReactivePowerUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ReactivePower(double value, ReactivePowerUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ReactivePower, which is Second. All conversions go via this value.
- ///
- public static ReactivePowerUnit BaseUnit { get; } = ReactivePowerUnit.VoltampereReactive;
-
- ///
- /// Represents the largest possible value of ReactivePower.
- ///
- public static ReactivePower MaxValue { get; } = new ReactivePower(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ReactivePower.
- ///
- public static ReactivePower MinValue { get; } = new ReactivePower(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ReactivePower Zero { get; } = new ReactivePower(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double GigavoltamperesReactive => As(ReactivePowerUnit.GigavoltampereReactive);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double KilovoltamperesReactive => As(ReactivePowerUnit.KilovoltampereReactive);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double MegavoltamperesReactive => As(ReactivePowerUnit.MegavoltampereReactive);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double VoltamperesReactive => As(ReactivePowerUnit.VoltampereReactive);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactivePower FromGigavoltamperesReactive(double gigavoltamperesreactive) => new ReactivePower(gigavoltamperesreactive, ReactivePowerUnit.GigavoltampereReactive);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactivePower FromKilovoltamperesReactive(double kilovoltamperesreactive) => new ReactivePower(kilovoltamperesreactive, ReactivePowerUnit.KilovoltampereReactive);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactivePower FromMegavoltamperesReactive(double megavoltamperesreactive) => new ReactivePower(megavoltamperesreactive, ReactivePowerUnit.MegavoltampereReactive);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ReactivePower FromVoltamperesReactive(double voltamperesreactive) => new ReactivePower(voltamperesreactive, ReactivePowerUnit.VoltampereReactive);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ReactivePower unit value.
- public static ReactivePower From(double value, ReactivePowerUnit fromUnit)
- {
- return new ReactivePower(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ReactivePowerUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ReactivePower to another ReactivePower with the unit representation .
- ///
- /// A ReactivePower with the specified unit.
- public ReactivePower ToUnit(ReactivePowerUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ReactivePower(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ReactivePowerUnit.GigavoltampereReactive => (_value) * 1e9d,
- ReactivePowerUnit.KilovoltampereReactive => (_value) * 1e3d,
- ReactivePowerUnit.MegavoltampereReactive => (_value) * 1e6d,
- ReactivePowerUnit.VoltampereReactive => _value,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ReactivePowerUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ReactivePowerUnit.GigavoltampereReactive => (baseUnitValue) / 1e9d,
- ReactivePowerUnit.KilovoltampereReactive => (baseUnitValue) / 1e3d,
- ReactivePowerUnit.MegavoltampereReactive => (baseUnitValue) / 1e6d,
- ReactivePowerUnit.VoltampereReactive => baseUnitValue,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalArea.g.cs
index f12226a0d6..0e4485de35 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalArea.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalArea.g.cs
@@ -54,7 +54,6 @@ public struct ReciprocalArea
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ReciprocalArea(double value, ReciprocalAreaUnit unit)
{
_value = value;
@@ -144,67 +143,56 @@ public ReciprocalArea(double value, ReciprocalAreaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareCentimeters(double inversesquarecentimeters) => new ReciprocalArea(inversesquarecentimeters, ReciprocalAreaUnit.InverseSquareCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareDecimeters(double inversesquaredecimeters) => new ReciprocalArea(inversesquaredecimeters, ReciprocalAreaUnit.InverseSquareDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareFeet(double inversesquarefeet) => new ReciprocalArea(inversesquarefeet, ReciprocalAreaUnit.InverseSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareInches(double inversesquareinches) => new ReciprocalArea(inversesquareinches, ReciprocalAreaUnit.InverseSquareInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareKilometers(double inversesquarekilometers) => new ReciprocalArea(inversesquarekilometers, ReciprocalAreaUnit.InverseSquareKilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareMeters(double inversesquaremeters) => new ReciprocalArea(inversesquaremeters, ReciprocalAreaUnit.InverseSquareMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareMicrometers(double inversesquaremicrometers) => new ReciprocalArea(inversesquaremicrometers, ReciprocalAreaUnit.InverseSquareMicrometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareMiles(double inversesquaremiles) => new ReciprocalArea(inversesquaremiles, ReciprocalAreaUnit.InverseSquareMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareMillimeters(double inversesquaremillimeters) => new ReciprocalArea(inversesquaremillimeters, ReciprocalAreaUnit.InverseSquareMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseSquareYards(double inversesquareyards) => new ReciprocalArea(inversesquareyards, ReciprocalAreaUnit.InverseSquareYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalArea FromInverseUsSurveySquareFeet(double inverseussurveysquarefeet) => new ReciprocalArea(inverseussurveysquarefeet, ReciprocalAreaUnit.InverseUsSurveySquareFoot);
///
@@ -249,15 +237,15 @@ private double GetValueInBaseUnit()
{
ReciprocalAreaUnit.InverseSquareCentimeter => _value / 1e-4,
ReciprocalAreaUnit.InverseSquareDecimeter => _value / 1e-2,
- ReciprocalAreaUnit.InverseSquareFoot => _value / 0.092903,
+ ReciprocalAreaUnit.InverseSquareFoot => _value / 9.290304e-2,
ReciprocalAreaUnit.InverseSquareInch => _value / 0.00064516,
ReciprocalAreaUnit.InverseSquareKilometer => _value / 1e6,
ReciprocalAreaUnit.InverseSquareMeter => _value,
ReciprocalAreaUnit.InverseSquareMicrometer => _value / 1e-12,
- ReciprocalAreaUnit.InverseSquareMile => _value / 2.59e6,
+ ReciprocalAreaUnit.InverseSquareMile => _value / (1609.344 * 1609.344),
ReciprocalAreaUnit.InverseSquareMillimeter => _value / 1e-6,
- ReciprocalAreaUnit.InverseSquareYard => _value / 0.836127,
- ReciprocalAreaUnit.InverseUsSurveySquareFoot => _value / 0.09290341161,
+ ReciprocalAreaUnit.InverseSquareYard => _value / (0.9144 * 0.9144),
+ ReciprocalAreaUnit.InverseUsSurveySquareFoot => _value / (1200.0 / 3937.0) / (1200.0 / 3937.0),
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -273,15 +261,15 @@ private double GetValueAs(ReciprocalAreaUnit unit)
{
ReciprocalAreaUnit.InverseSquareCentimeter => baseUnitValue * 1e-4,
ReciprocalAreaUnit.InverseSquareDecimeter => baseUnitValue * 1e-2,
- ReciprocalAreaUnit.InverseSquareFoot => baseUnitValue * 0.092903,
+ ReciprocalAreaUnit.InverseSquareFoot => baseUnitValue * 9.290304e-2,
ReciprocalAreaUnit.InverseSquareInch => baseUnitValue * 0.00064516,
ReciprocalAreaUnit.InverseSquareKilometer => baseUnitValue * 1e6,
ReciprocalAreaUnit.InverseSquareMeter => baseUnitValue,
ReciprocalAreaUnit.InverseSquareMicrometer => baseUnitValue * 1e-12,
- ReciprocalAreaUnit.InverseSquareMile => baseUnitValue * 2.59e6,
+ ReciprocalAreaUnit.InverseSquareMile => baseUnitValue * (1609.344 * 1609.344),
ReciprocalAreaUnit.InverseSquareMillimeter => baseUnitValue * 1e-6,
- ReciprocalAreaUnit.InverseSquareYard => baseUnitValue * 0.836127,
- ReciprocalAreaUnit.InverseUsSurveySquareFoot => baseUnitValue * 0.09290341161,
+ ReciprocalAreaUnit.InverseSquareYard => baseUnitValue * (0.9144 * 0.9144),
+ ReciprocalAreaUnit.InverseUsSurveySquareFoot => baseUnitValue * (1200.0 / 3937.0) * (1200.0 / 3937.0),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalLength.g.cs
index ec25d4a246..0cbd11da52 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalLength.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ReciprocalLength.g.cs
@@ -54,7 +54,6 @@ public struct ReciprocalLength
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ReciprocalLength(double value, ReciprocalLengthUnit unit)
{
_value = value;
@@ -139,61 +138,51 @@ public ReciprocalLength(double value, ReciprocalLengthUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseCentimeters(double inversecentimeters) => new ReciprocalLength(inversecentimeters, ReciprocalLengthUnit.InverseCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseFeet(double inversefeet) => new ReciprocalLength(inversefeet, ReciprocalLengthUnit.InverseFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseInches(double inverseinches) => new ReciprocalLength(inverseinches, ReciprocalLengthUnit.InverseInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseMeters(double inversemeters) => new ReciprocalLength(inversemeters, ReciprocalLengthUnit.InverseMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseMicroinches(double inversemicroinches) => new ReciprocalLength(inversemicroinches, ReciprocalLengthUnit.InverseMicroinch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseMils(double inversemils) => new ReciprocalLength(inversemils, ReciprocalLengthUnit.InverseMil);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseMiles(double inversemiles) => new ReciprocalLength(inversemiles, ReciprocalLengthUnit.InverseMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseMillimeters(double inversemillimeters) => new ReciprocalLength(inversemillimeters, ReciprocalLengthUnit.InverseMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseUsSurveyFeet(double inverseussurveyfeet) => new ReciprocalLength(inverseussurveyfeet, ReciprocalLengthUnit.InverseUsSurveyFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ReciprocalLength FromInverseYards(double inverseyards) => new ReciprocalLength(inverseyards, ReciprocalLengthUnit.InverseYard);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RelativeHumidity.g.cs
index f1bb187f2d..6c257083e6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RelativeHumidity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RelativeHumidity.g.cs
@@ -51,7 +51,6 @@ public struct RelativeHumidity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RelativeHumidity(double value, RelativeHumidityUnit unit)
{
_value = value;
@@ -91,7 +90,6 @@ public RelativeHumidity(double value, RelativeHumidityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RelativeHumidity FromPercent(double percent) => new RelativeHumidity(percent, RelativeHumidityUnit.Percent);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalAcceleration.g.cs
index fe99537373..5eb559c7ac 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalAcceleration.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalAcceleration.g.cs
@@ -51,7 +51,6 @@ public struct RotationalAcceleration
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RotationalAcceleration(double value, RotationalAccelerationUnit unit)
{
_value = value;
@@ -106,25 +105,21 @@ public RotationalAcceleration(double value, RotationalAccelerationUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalAcceleration FromDegreesPerSecondSquared(double degreespersecondsquared) => new RotationalAcceleration(degreespersecondsquared, RotationalAccelerationUnit.DegreePerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalAcceleration FromRadiansPerSecondSquared(double radianspersecondsquared) => new RotationalAcceleration(radianspersecondsquared, RotationalAccelerationUnit.RadianPerSecondSquared);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalAcceleration FromRevolutionsPerMinutePerSecond(double revolutionsperminutepersecond) => new RotationalAcceleration(revolutionsperminutepersecond, RotationalAccelerationUnit.RevolutionPerMinutePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalAcceleration FromRevolutionsPerSecondSquared(double revolutionspersecondsquared) => new RotationalAcceleration(revolutionspersecondsquared, RotationalAccelerationUnit.RevolutionPerSecondSquared);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalSpeed.g.cs
index a56e963352..d45f2190cd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalSpeed.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalSpeed.g.cs
@@ -51,7 +51,6 @@ public struct RotationalSpeed
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RotationalSpeed(double value, RotationalSpeedUnit unit)
{
_value = value;
@@ -151,79 +150,66 @@ public RotationalSpeed(double value, RotationalSpeedUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromCentiradiansPerSecond(double centiradianspersecond) => new RotationalSpeed(centiradianspersecond, RotationalSpeedUnit.CentiradianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromDeciradiansPerSecond(double deciradianspersecond) => new RotationalSpeed(deciradianspersecond, RotationalSpeedUnit.DeciradianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromDegreesPerMinute(double degreesperminute) => new RotationalSpeed(degreesperminute, RotationalSpeedUnit.DegreePerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromDegreesPerSecond(double degreespersecond) => new RotationalSpeed(degreespersecond, RotationalSpeedUnit.DegreePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromMicrodegreesPerSecond(double microdegreespersecond) => new RotationalSpeed(microdegreespersecond, RotationalSpeedUnit.MicrodegreePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromMicroradiansPerSecond(double microradianspersecond) => new RotationalSpeed(microradianspersecond, RotationalSpeedUnit.MicroradianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromMillidegreesPerSecond(double millidegreespersecond) => new RotationalSpeed(millidegreespersecond, RotationalSpeedUnit.MillidegreePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromMilliradiansPerSecond(double milliradianspersecond) => new RotationalSpeed(milliradianspersecond, RotationalSpeedUnit.MilliradianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromNanodegreesPerSecond(double nanodegreespersecond) => new RotationalSpeed(nanodegreespersecond, RotationalSpeedUnit.NanodegreePerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromNanoradiansPerSecond(double nanoradianspersecond) => new RotationalSpeed(nanoradianspersecond, RotationalSpeedUnit.NanoradianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromRadiansPerSecond(double radianspersecond) => new RotationalSpeed(radianspersecond, RotationalSpeedUnit.RadianPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromRevolutionsPerMinute(double revolutionsperminute) => new RotationalSpeed(revolutionsperminute, RotationalSpeedUnit.RevolutionPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalSpeed FromRevolutionsPerSecond(double revolutionspersecond) => new RotationalSpeed(revolutionspersecond, RotationalSpeedUnit.RevolutionPerSecond);
///
@@ -277,8 +263,8 @@ private double GetValueInBaseUnit()
RotationalSpeedUnit.NanodegreePerSecond => ((3.1415926535897931 / 180) * _value) * 1e-9d,
RotationalSpeedUnit.NanoradianPerSecond => (_value) * 1e-9d,
RotationalSpeedUnit.RadianPerSecond => _value,
- RotationalSpeedUnit.RevolutionPerMinute => (_value * 6.2831853072) / 60,
- RotationalSpeedUnit.RevolutionPerSecond => _value * 6.2831853072,
+ RotationalSpeedUnit.RevolutionPerMinute => (_value * 2 * 3.1415926535897931) / 60,
+ RotationalSpeedUnit.RevolutionPerSecond => _value * 2 * 3.1415926535897931,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -303,8 +289,8 @@ private double GetValueAs(RotationalSpeedUnit unit)
RotationalSpeedUnit.NanodegreePerSecond => ((180 / 3.1415926535897931) * baseUnitValue) / 1e-9d,
RotationalSpeedUnit.NanoradianPerSecond => (baseUnitValue) / 1e-9d,
RotationalSpeedUnit.RadianPerSecond => baseUnitValue,
- RotationalSpeedUnit.RevolutionPerMinute => (baseUnitValue / 6.2831853072) * 60,
- RotationalSpeedUnit.RevolutionPerSecond => baseUnitValue / 6.2831853072,
+ RotationalSpeedUnit.RevolutionPerMinute => (baseUnitValue / (2 * 3.1415926535897931)) * 60,
+ RotationalSpeedUnit.RevolutionPerSecond => baseUnitValue / (2 * 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffness.g.cs
index bd08d80f13..752461eeba 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffness.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffness.g.cs
@@ -51,7 +51,6 @@ public struct RotationalStiffness
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RotationalStiffness(double value, RotationalStiffnessUnit unit)
{
_value = value;
@@ -251,199 +250,166 @@ public RotationalStiffness(double value, RotationalStiffnessUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromCentinewtonMetersPerDegree(double centinewtonmetersperdegree) => new RotationalStiffness(centinewtonmetersperdegree, RotationalStiffnessUnit.CentinewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromCentinewtonMillimetersPerDegree(double centinewtonmillimetersperdegree) => new RotationalStiffness(centinewtonmillimetersperdegree, RotationalStiffnessUnit.CentinewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromCentinewtonMillimetersPerRadian(double centinewtonmillimetersperradian) => new RotationalStiffness(centinewtonmillimetersperradian, RotationalStiffnessUnit.CentinewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecanewtonMetersPerDegree(double decanewtonmetersperdegree) => new RotationalStiffness(decanewtonmetersperdegree, RotationalStiffnessUnit.DecanewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecanewtonMillimetersPerDegree(double decanewtonmillimetersperdegree) => new RotationalStiffness(decanewtonmillimetersperdegree, RotationalStiffnessUnit.DecanewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecanewtonMillimetersPerRadian(double decanewtonmillimetersperradian) => new RotationalStiffness(decanewtonmillimetersperradian, RotationalStiffnessUnit.DecanewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecinewtonMetersPerDegree(double decinewtonmetersperdegree) => new RotationalStiffness(decinewtonmetersperdegree, RotationalStiffnessUnit.DecinewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecinewtonMillimetersPerDegree(double decinewtonmillimetersperdegree) => new RotationalStiffness(decinewtonmillimetersperdegree, RotationalStiffnessUnit.DecinewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromDecinewtonMillimetersPerRadian(double decinewtonmillimetersperradian) => new RotationalStiffness(decinewtonmillimetersperradian, RotationalStiffnessUnit.DecinewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromKilonewtonMetersPerDegree(double kilonewtonmetersperdegree) => new RotationalStiffness(kilonewtonmetersperdegree, RotationalStiffnessUnit.KilonewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromKilonewtonMetersPerRadian(double kilonewtonmetersperradian) => new RotationalStiffness(kilonewtonmetersperradian, RotationalStiffnessUnit.KilonewtonMeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromKilonewtonMillimetersPerDegree(double kilonewtonmillimetersperdegree) => new RotationalStiffness(kilonewtonmillimetersperdegree, RotationalStiffnessUnit.KilonewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromKilonewtonMillimetersPerRadian(double kilonewtonmillimetersperradian) => new RotationalStiffness(kilonewtonmillimetersperradian, RotationalStiffnessUnit.KilonewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromKilopoundForceFeetPerDegrees(double kilopoundforcefeetperdegrees) => new RotationalStiffness(kilopoundforcefeetperdegrees, RotationalStiffnessUnit.KilopoundForceFootPerDegrees);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMeganewtonMetersPerDegree(double meganewtonmetersperdegree) => new RotationalStiffness(meganewtonmetersperdegree, RotationalStiffnessUnit.MeganewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMeganewtonMetersPerRadian(double meganewtonmetersperradian) => new RotationalStiffness(meganewtonmetersperradian, RotationalStiffnessUnit.MeganewtonMeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMeganewtonMillimetersPerDegree(double meganewtonmillimetersperdegree) => new RotationalStiffness(meganewtonmillimetersperdegree, RotationalStiffnessUnit.MeganewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMeganewtonMillimetersPerRadian(double meganewtonmillimetersperradian) => new RotationalStiffness(meganewtonmillimetersperradian, RotationalStiffnessUnit.MeganewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMicronewtonMetersPerDegree(double micronewtonmetersperdegree) => new RotationalStiffness(micronewtonmetersperdegree, RotationalStiffnessUnit.MicronewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMicronewtonMillimetersPerDegree(double micronewtonmillimetersperdegree) => new RotationalStiffness(micronewtonmillimetersperdegree, RotationalStiffnessUnit.MicronewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMicronewtonMillimetersPerRadian(double micronewtonmillimetersperradian) => new RotationalStiffness(micronewtonmillimetersperradian, RotationalStiffnessUnit.MicronewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMillinewtonMetersPerDegree(double millinewtonmetersperdegree) => new RotationalStiffness(millinewtonmetersperdegree, RotationalStiffnessUnit.MillinewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMillinewtonMillimetersPerDegree(double millinewtonmillimetersperdegree) => new RotationalStiffness(millinewtonmillimetersperdegree, RotationalStiffnessUnit.MillinewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromMillinewtonMillimetersPerRadian(double millinewtonmillimetersperradian) => new RotationalStiffness(millinewtonmillimetersperradian, RotationalStiffnessUnit.MillinewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNanonewtonMetersPerDegree(double nanonewtonmetersperdegree) => new RotationalStiffness(nanonewtonmetersperdegree, RotationalStiffnessUnit.NanonewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNanonewtonMillimetersPerDegree(double nanonewtonmillimetersperdegree) => new RotationalStiffness(nanonewtonmillimetersperdegree, RotationalStiffnessUnit.NanonewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNanonewtonMillimetersPerRadian(double nanonewtonmillimetersperradian) => new RotationalStiffness(nanonewtonmillimetersperradian, RotationalStiffnessUnit.NanonewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNewtonMetersPerDegree(double newtonmetersperdegree) => new RotationalStiffness(newtonmetersperdegree, RotationalStiffnessUnit.NewtonMeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNewtonMetersPerRadian(double newtonmetersperradian) => new RotationalStiffness(newtonmetersperradian, RotationalStiffnessUnit.NewtonMeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNewtonMillimetersPerDegree(double newtonmillimetersperdegree) => new RotationalStiffness(newtonmillimetersperdegree, RotationalStiffnessUnit.NewtonMillimeterPerDegree);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromNewtonMillimetersPerRadian(double newtonmillimetersperradian) => new RotationalStiffness(newtonmillimetersperradian, RotationalStiffnessUnit.NewtonMillimeterPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromPoundForceFeetPerRadian(double poundforcefeetperradian) => new RotationalStiffness(poundforcefeetperradian, RotationalStiffnessUnit.PoundForceFeetPerRadian);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffness FromPoundForceFeetPerDegrees(double poundforcefeetperdegrees) => new RotationalStiffness(poundforcefeetperdegrees, RotationalStiffnessUnit.PoundForceFootPerDegrees);
///
@@ -499,7 +465,7 @@ private double GetValueInBaseUnit()
RotationalStiffnessUnit.KilonewtonMeterPerRadian => (_value) * 1e3d,
RotationalStiffnessUnit.KilonewtonMillimeterPerDegree => (_value * 180 / 3.1415926535897931 * 0.001) * 1e3d,
RotationalStiffnessUnit.KilonewtonMillimeterPerRadian => (_value * 0.001) * 1e3d,
- RotationalStiffnessUnit.KilopoundForceFootPerDegrees => _value * 77682.6,
+ RotationalStiffnessUnit.KilopoundForceFootPerDegrees => _value * (4.4482216152605e3 * 0.3048 * 180 / 3.1415926535897931),
RotationalStiffnessUnit.MeganewtonMeterPerDegree => (_value * (180 / 3.1415926535897931)) * 1e6d,
RotationalStiffnessUnit.MeganewtonMeterPerRadian => (_value) * 1e6d,
RotationalStiffnessUnit.MeganewtonMillimeterPerDegree => (_value * 180 / 3.1415926535897931 * 0.001) * 1e6d,
@@ -517,8 +483,8 @@ private double GetValueInBaseUnit()
RotationalStiffnessUnit.NewtonMeterPerRadian => _value,
RotationalStiffnessUnit.NewtonMillimeterPerDegree => _value * 180 / 3.1415926535897931 * 0.001,
RotationalStiffnessUnit.NewtonMillimeterPerRadian => _value * 0.001,
- RotationalStiffnessUnit.PoundForceFeetPerRadian => _value * 1.3558179483314,
- RotationalStiffnessUnit.PoundForceFootPerDegrees => _value * 77.6826,
+ RotationalStiffnessUnit.PoundForceFeetPerRadian => _value * 4.4482216152605 * 0.3048,
+ RotationalStiffnessUnit.PoundForceFootPerDegrees => _value * (4.4482216152605 * 0.3048 * 180 / 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -545,7 +511,7 @@ private double GetValueAs(RotationalStiffnessUnit unit)
RotationalStiffnessUnit.KilonewtonMeterPerRadian => (baseUnitValue) / 1e3d,
RotationalStiffnessUnit.KilonewtonMillimeterPerDegree => (baseUnitValue / 180 * 3.1415926535897931 * 1000) / 1e3d,
RotationalStiffnessUnit.KilonewtonMillimeterPerRadian => (baseUnitValue * 1000) / 1e3d,
- RotationalStiffnessUnit.KilopoundForceFootPerDegrees => baseUnitValue / 77682.6,
+ RotationalStiffnessUnit.KilopoundForceFootPerDegrees => baseUnitValue / (4.4482216152605e3 * 0.3048 * 180 / 3.1415926535897931),
RotationalStiffnessUnit.MeganewtonMeterPerDegree => (baseUnitValue / (180 / 3.1415926535897931)) / 1e6d,
RotationalStiffnessUnit.MeganewtonMeterPerRadian => (baseUnitValue) / 1e6d,
RotationalStiffnessUnit.MeganewtonMillimeterPerDegree => (baseUnitValue / 180 * 3.1415926535897931 * 1000) / 1e6d,
@@ -563,8 +529,8 @@ private double GetValueAs(RotationalStiffnessUnit unit)
RotationalStiffnessUnit.NewtonMeterPerRadian => baseUnitValue,
RotationalStiffnessUnit.NewtonMillimeterPerDegree => baseUnitValue / 180 * 3.1415926535897931 * 1000,
RotationalStiffnessUnit.NewtonMillimeterPerRadian => baseUnitValue * 1000,
- RotationalStiffnessUnit.PoundForceFeetPerRadian => baseUnitValue / 1.3558179483314,
- RotationalStiffnessUnit.PoundForceFootPerDegrees => baseUnitValue / 77.6826,
+ RotationalStiffnessUnit.PoundForceFeetPerRadian => baseUnitValue / (4.4482216152605 * 0.3048),
+ RotationalStiffnessUnit.PoundForceFootPerDegrees => baseUnitValue / (4.4482216152605 * 0.3048 * 180 / 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
index ce92814c71..69320a0eda 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs
@@ -51,7 +51,6 @@ public struct RotationalStiffnessPerLength
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public RotationalStiffnessPerLength(double value, RotationalStiffnessPerLengthUnit unit)
{
_value = value;
@@ -111,31 +110,26 @@ public RotationalStiffnessPerLength(double value, RotationalStiffnessPerLengthUn
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffnessPerLength FromKilonewtonMetersPerRadianPerMeter(double kilonewtonmetersperradianpermeter) => new RotationalStiffnessPerLength(kilonewtonmetersperradianpermeter, RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffnessPerLength FromKilopoundForceFeetPerDegreesPerFeet(double kilopoundforcefeetperdegreesperfeet) => new RotationalStiffnessPerLength(kilopoundforcefeetperdegreesperfeet, RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffnessPerLength FromMeganewtonMetersPerRadianPerMeter(double meganewtonmetersperradianpermeter) => new RotationalStiffnessPerLength(meganewtonmetersperradianpermeter, RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffnessPerLength FromNewtonMetersPerRadianPerMeter(double newtonmetersperradianpermeter) => new RotationalStiffnessPerLength(newtonmetersperradianpermeter, RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static RotationalStiffnessPerLength FromPoundForceFeetPerDegreesPerFeet(double poundforcefeetperdegreesperfeet) => new RotationalStiffnessPerLength(poundforcefeetperdegreesperfeet, RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot);
///
@@ -179,10 +173,10 @@ private double GetValueInBaseUnit()
return Unit switch
{
RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter => (_value) * 1e3d,
- RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot => _value * 254864.324570,
+ RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot => _value * (4.4482216152605e3 * 180 / 3.1415926535897931),
RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter => (_value) * 1e6d,
RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter => _value,
- RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot => _value * 254.864324570,
+ RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot => _value * (4.4482216152605 * 180 / 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -197,10 +191,10 @@ private double GetValueAs(RotationalStiffnessPerLengthUnit unit)
return unit switch
{
RotationalStiffnessPerLengthUnit.KilonewtonMeterPerRadianPerMeter => (baseUnitValue) / 1e3d,
- RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot => baseUnitValue / 254864.324570,
+ RotationalStiffnessPerLengthUnit.KilopoundForceFootPerDegreesPerFoot => baseUnitValue / (4.4482216152605e3 * 180 / 3.1415926535897931),
RotationalStiffnessPerLengthUnit.MeganewtonMeterPerRadianPerMeter => (baseUnitValue) / 1e6d,
RotationalStiffnessPerLengthUnit.NewtonMeterPerRadianPerMeter => baseUnitValue,
- RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot => baseUnitValue / 254.864324570,
+ RotationalStiffnessPerLengthUnit.PoundForceFootPerDegreesPerFoot => baseUnitValue / (4.4482216152605 * 180 / 3.1415926535897931),
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Scalar.g.cs
index 3b38192b98..59bf24d5e2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Scalar.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Scalar.g.cs
@@ -51,7 +51,6 @@ public struct Scalar
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Scalar(double value, ScalarUnit unit)
{
_value = value;
@@ -91,7 +90,6 @@ public Scalar(double value, ScalarUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Scalar FromAmount(double amount) => new Scalar(amount, ScalarUnit.Amount);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SolidAngle.g.cs
index 46f3b534a6..f9aeabdfa3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SolidAngle.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SolidAngle.g.cs
@@ -54,7 +54,6 @@ public struct SolidAngle
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SolidAngle(double value, SolidAngleUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public SolidAngle(double value, SolidAngleUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SolidAngle FromSteradians(double steradians) => new SolidAngle(steradians, SolidAngleUnit.Steradian);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEnergy.g.cs
index ad1a2d05ea..55e12373fa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEnergy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEnergy.g.cs
@@ -54,7 +54,6 @@ public struct SpecificEnergy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SpecificEnergy(double value, SpecificEnergyUnit unit)
{
_value = value;
@@ -239,181 +238,151 @@ public SpecificEnergy(double value, SpecificEnergyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromBtuPerPound(double btuperpound) => new SpecificEnergy(btuperpound, SpecificEnergyUnit.BtuPerPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromCaloriesPerGram(double caloriespergram) => new SpecificEnergy(caloriespergram, SpecificEnergyUnit.CaloriePerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromGigawattDaysPerKilogram(double gigawattdaysperkilogram) => new SpecificEnergy(gigawattdaysperkilogram, SpecificEnergyUnit.GigawattDayPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromGigawattDaysPerShortTon(double gigawattdayspershortton) => new SpecificEnergy(gigawattdayspershortton, SpecificEnergyUnit.GigawattDayPerShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromGigawattDaysPerTonne(double gigawattdayspertonne) => new SpecificEnergy(gigawattdayspertonne, SpecificEnergyUnit.GigawattDayPerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromGigawattHoursPerKilogram(double gigawatthoursperkilogram) => new SpecificEnergy(gigawatthoursperkilogram, SpecificEnergyUnit.GigawattHourPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromGigawattHoursPerPound(double gigawatthoursperpound) => new SpecificEnergy(gigawatthoursperpound, SpecificEnergyUnit.GigawattHourPerPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromJoulesPerKilogram(double joulesperkilogram) => new SpecificEnergy(joulesperkilogram, SpecificEnergyUnit.JoulePerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilocaloriesPerGram(double kilocaloriespergram) => new SpecificEnergy(kilocaloriespergram, SpecificEnergyUnit.KilocaloriePerGram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilojoulesPerKilogram(double kilojoulesperkilogram) => new SpecificEnergy(kilojoulesperkilogram, SpecificEnergyUnit.KilojoulePerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilowattDaysPerKilogram(double kilowattdaysperkilogram) => new SpecificEnergy(kilowattdaysperkilogram, SpecificEnergyUnit.KilowattDayPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilowattDaysPerShortTon(double kilowattdayspershortton) => new SpecificEnergy(kilowattdayspershortton, SpecificEnergyUnit.KilowattDayPerShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilowattDaysPerTonne(double kilowattdayspertonne) => new SpecificEnergy(kilowattdayspertonne, SpecificEnergyUnit.KilowattDayPerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilowattHoursPerKilogram(double kilowatthoursperkilogram) => new SpecificEnergy(kilowatthoursperkilogram, SpecificEnergyUnit.KilowattHourPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromKilowattHoursPerPound(double kilowatthoursperpound) => new SpecificEnergy(kilowatthoursperpound, SpecificEnergyUnit.KilowattHourPerPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegajoulesPerKilogram(double megajoulesperkilogram) => new SpecificEnergy(megajoulesperkilogram, SpecificEnergyUnit.MegajoulePerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegaJoulesPerTonne(double megajoulespertonne) => new SpecificEnergy(megajoulespertonne, SpecificEnergyUnit.MegaJoulePerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegawattDaysPerKilogram(double megawattdaysperkilogram) => new SpecificEnergy(megawattdaysperkilogram, SpecificEnergyUnit.MegawattDayPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegawattDaysPerShortTon(double megawattdayspershortton) => new SpecificEnergy(megawattdayspershortton, SpecificEnergyUnit.MegawattDayPerShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegawattDaysPerTonne(double megawattdayspertonne) => new SpecificEnergy(megawattdayspertonne, SpecificEnergyUnit.MegawattDayPerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegawattHoursPerKilogram(double megawatthoursperkilogram) => new SpecificEnergy(megawatthoursperkilogram, SpecificEnergyUnit.MegawattHourPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromMegawattHoursPerPound(double megawatthoursperpound) => new SpecificEnergy(megawatthoursperpound, SpecificEnergyUnit.MegawattHourPerPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromTerawattDaysPerKilogram(double terawattdaysperkilogram) => new SpecificEnergy(terawattdaysperkilogram, SpecificEnergyUnit.TerawattDayPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromTerawattDaysPerShortTon(double terawattdayspershortton) => new SpecificEnergy(terawattdayspershortton, SpecificEnergyUnit.TerawattDayPerShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromTerawattDaysPerTonne(double terawattdayspertonne) => new SpecificEnergy(terawattdayspertonne, SpecificEnergyUnit.TerawattDayPerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromWattDaysPerKilogram(double wattdaysperkilogram) => new SpecificEnergy(wattdaysperkilogram, SpecificEnergyUnit.WattDayPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromWattDaysPerShortTon(double wattdayspershortton) => new SpecificEnergy(wattdayspershortton, SpecificEnergyUnit.WattDayPerShortTon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromWattDaysPerTonne(double wattdayspertonne) => new SpecificEnergy(wattdayspertonne, SpecificEnergyUnit.WattDayPerTonne);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromWattHoursPerKilogram(double watthoursperkilogram) => new SpecificEnergy(watthoursperkilogram, SpecificEnergyUnit.WattHourPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEnergy FromWattHoursPerPound(double watthoursperpound) => new SpecificEnergy(watthoursperpound, SpecificEnergyUnit.WattHourPerPound);
///
@@ -456,7 +425,7 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- SpecificEnergyUnit.BtuPerPound => _value * 2326.000075362,
+ SpecificEnergyUnit.BtuPerPound => _value * 1055.05585262 / 0.45359237,
SpecificEnergyUnit.CaloriePerGram => _value * 4.184e3,
SpecificEnergyUnit.GigawattDayPerKilogram => (_value * (24 * 3.6e3)) * 1e9d,
SpecificEnergyUnit.GigawattDayPerShortTon => (_value * ((24 * 3.6e3) / 9.0718474e2)) * 1e9d,
@@ -499,7 +468,7 @@ private double GetValueAs(SpecificEnergyUnit unit)
return unit switch
{
- SpecificEnergyUnit.BtuPerPound => baseUnitValue / 2326.000075362,
+ SpecificEnergyUnit.BtuPerPound => baseUnitValue * 0.45359237 / 1055.05585262,
SpecificEnergyUnit.CaloriePerGram => baseUnitValue / 4.184e3,
SpecificEnergyUnit.GigawattDayPerKilogram => (baseUnitValue / (24 * 3.6e3)) / 1e9d,
SpecificEnergyUnit.GigawattDayPerShortTon => (baseUnitValue / ((24 * 3.6e3) / 9.0718474e2)) / 1e9d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEntropy.g.cs
index 303d54d2b7..0985da409c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEntropy.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificEntropy.g.cs
@@ -51,7 +51,6 @@ public struct SpecificEntropy
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SpecificEntropy(double value, SpecificEntropyUnit unit)
{
_value = value;
@@ -131,55 +130,46 @@ public SpecificEntropy(double value, SpecificEntropyUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromBtusPerPoundFahrenheit(double btusperpoundfahrenheit) => new SpecificEntropy(btusperpoundfahrenheit, SpecificEntropyUnit.BtuPerPoundFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromCaloriesPerGramKelvin(double caloriespergramkelvin) => new SpecificEntropy(caloriespergramkelvin, SpecificEntropyUnit.CaloriePerGramKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromJoulesPerKilogramDegreeCelsius(double joulesperkilogramdegreecelsius) => new SpecificEntropy(joulesperkilogramdegreecelsius, SpecificEntropyUnit.JoulePerKilogramDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromJoulesPerKilogramKelvin(double joulesperkilogramkelvin) => new SpecificEntropy(joulesperkilogramkelvin, SpecificEntropyUnit.JoulePerKilogramKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromKilocaloriesPerGramKelvin(double kilocaloriespergramkelvin) => new SpecificEntropy(kilocaloriespergramkelvin, SpecificEntropyUnit.KilocaloriePerGramKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromKilojoulesPerKilogramDegreeCelsius(double kilojoulesperkilogramdegreecelsius) => new SpecificEntropy(kilojoulesperkilogramdegreecelsius, SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromKilojoulesPerKilogramKelvin(double kilojoulesperkilogramkelvin) => new SpecificEntropy(kilojoulesperkilogramkelvin, SpecificEntropyUnit.KilojoulePerKilogramKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromMegajoulesPerKilogramDegreeCelsius(double megajoulesperkilogramdegreecelsius) => new SpecificEntropy(megajoulesperkilogramdegreecelsius, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificEntropy FromMegajoulesPerKilogramKelvin(double megajoulesperkilogramkelvin) => new SpecificEntropy(megajoulesperkilogramkelvin, SpecificEntropyUnit.MegajoulePerKilogramKelvin);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
index dd602d6fa2..1cce578a84 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs
@@ -54,7 +54,6 @@ public struct SpecificFuelConsumption
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SpecificFuelConsumption(double value, SpecificFuelConsumptionUnit unit)
{
_value = value;
@@ -64,7 +63,7 @@ public SpecificFuelConsumption(double value, SpecificFuelConsumptionUnit unit)
///
/// The base unit of SpecificFuelConsumption, which is Second. All conversions go via this value.
///
- public static SpecificFuelConsumptionUnit BaseUnit { get; } = SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond;
+ public static SpecificFuelConsumptionUnit BaseUnit { get; } = SpecificFuelConsumptionUnit.GramPerKilonewtonSecond;
///
/// Represents the largest possible value of SpecificFuelConsumption.
@@ -83,9 +82,9 @@ public SpecificFuelConsumption(double value, SpecificFuelConsumptionUnit unit)
#region Conversion Properties
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double GramsPerKiloNewtonSecond => As(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond);
+ public double GramsPerKilonewtonSecond => As(SpecificFuelConsumptionUnit.GramPerKilonewtonSecond);
///
/// Gets a value of this quantity converted into
@@ -93,9 +92,9 @@ public SpecificFuelConsumption(double value, SpecificFuelConsumptionUnit unit)
public double KilogramsPerKilogramForceHour => As(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double KilogramsPerKiloNewtonSecond => As(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond);
+ public double KilogramsPerKilonewtonSecond => As(SpecificFuelConsumptionUnit.KilogramPerKilonewtonSecond);
///
/// Gets a value of this quantity converted into
@@ -107,27 +106,23 @@ public SpecificFuelConsumption(double value, SpecificFuelConsumptionUnit unit)
#region Static Factory Methods
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static SpecificFuelConsumption FromGramsPerKiloNewtonSecond(double gramsperkilonewtonsecond) => new SpecificFuelConsumption(gramsperkilonewtonsecond, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond);
+ public static SpecificFuelConsumption FromGramsPerKilonewtonSecond(double gramsperkilonewtonsecond) => new SpecificFuelConsumption(gramsperkilonewtonsecond, SpecificFuelConsumptionUnit.GramPerKilonewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificFuelConsumption FromKilogramsPerKilogramForceHour(double kilogramsperkilogramforcehour) => new SpecificFuelConsumption(kilogramsperkilogramforcehour, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static SpecificFuelConsumption FromKilogramsPerKiloNewtonSecond(double kilogramsperkilonewtonsecond) => new SpecificFuelConsumption(kilogramsperkilonewtonsecond, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond);
+ public static SpecificFuelConsumption FromKilogramsPerKilonewtonSecond(double kilogramsperkilonewtonsecond) => new SpecificFuelConsumption(kilogramsperkilonewtonsecond, SpecificFuelConsumptionUnit.KilogramPerKilonewtonSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificFuelConsumption FromPoundsMassPerPoundForceHour(double poundsmassperpoundforcehour) => new SpecificFuelConsumption(poundsmassperpoundforcehour, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour);
///
@@ -170,10 +165,10 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond => _value,
- SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour => _value * 28.33,
- SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond => (_value) * 1e3d,
- SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour => _value * 28.33,
+ SpecificFuelConsumptionUnit.GramPerKilonewtonSecond => _value,
+ SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour => _value * 1000 / (9.80665e-3 * 3600),
+ SpecificFuelConsumptionUnit.KilogramPerKilonewtonSecond => (_value) * 1e3d,
+ SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour => _value * 1000 / (9.80665e-3 * 3600),
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -187,10 +182,10 @@ private double GetValueAs(SpecificFuelConsumptionUnit unit)
return unit switch
{
- SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond => baseUnitValue,
- SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour => baseUnitValue / 28.33,
- SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond => (baseUnitValue) / 1e3d,
- SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour => baseUnitValue / 28.33,
+ SpecificFuelConsumptionUnit.GramPerKilonewtonSecond => baseUnitValue,
+ SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour => baseUnitValue * 9.80665e-3 * 3600 / 1000,
+ SpecificFuelConsumptionUnit.KilogramPerKilonewtonSecond => (baseUnitValue) / 1e3d,
+ SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour => baseUnitValue * 9.80665e-3 * 3600 / 1000,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificVolume.g.cs
index 8997fc6fbc..89322d028e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificVolume.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificVolume.g.cs
@@ -51,7 +51,6 @@ public struct SpecificVolume
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SpecificVolume(double value, SpecificVolumeUnit unit)
{
_value = value;
@@ -101,19 +100,16 @@ public SpecificVolume(double value, SpecificVolumeUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificVolume FromCubicFeetPerPound(double cubicfeetperpound) => new SpecificVolume(cubicfeetperpound, SpecificVolumeUnit.CubicFootPerPound);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificVolume FromCubicMetersPerKilogram(double cubicmetersperkilogram) => new SpecificVolume(cubicmetersperkilogram, SpecificVolumeUnit.CubicMeterPerKilogram);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificVolume FromMillicubicMetersPerKilogram(double millicubicmetersperkilogram) => new SpecificVolume(millicubicmetersperkilogram, SpecificVolumeUnit.MillicubicMeterPerKilogram);
///
@@ -156,7 +152,7 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- SpecificVolumeUnit.CubicFootPerPound => _value / 16.01846353,
+ SpecificVolumeUnit.CubicFootPerPound => _value * 0.028316846592 / 0.45359237,
SpecificVolumeUnit.CubicMeterPerKilogram => _value,
SpecificVolumeUnit.MillicubicMeterPerKilogram => (_value) * 1e-3d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -172,7 +168,7 @@ private double GetValueAs(SpecificVolumeUnit unit)
return unit switch
{
- SpecificVolumeUnit.CubicFootPerPound => baseUnitValue * 16.01846353,
+ SpecificVolumeUnit.CubicFootPerPound => baseUnitValue * 0.45359237 / 0.028316846592,
SpecificVolumeUnit.CubicMeterPerKilogram => baseUnitValue,
SpecificVolumeUnit.MillicubicMeterPerKilogram => (baseUnitValue) / 1e-3d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificWeight.g.cs
index 099d3bf206..9d23e9bbb7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificWeight.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/SpecificWeight.g.cs
@@ -54,7 +54,6 @@ public struct SpecificWeight
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public SpecificWeight(double value, SpecificWeightUnit unit)
{
_value = value;
@@ -174,103 +173,86 @@ public SpecificWeight(double value, SpecificWeightUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilogramsForcePerCubicCentimeter(double kilogramsforcepercubiccentimeter) => new SpecificWeight(kilogramsforcepercubiccentimeter, SpecificWeightUnit.KilogramForcePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilogramsForcePerCubicMeter(double kilogramsforcepercubicmeter) => new SpecificWeight(kilogramsforcepercubicmeter, SpecificWeightUnit.KilogramForcePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilogramsForcePerCubicMillimeter(double kilogramsforcepercubicmillimeter) => new SpecificWeight(kilogramsforcepercubicmillimeter, SpecificWeightUnit.KilogramForcePerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilonewtonsPerCubicCentimeter(double kilonewtonspercubiccentimeter) => new SpecificWeight(kilonewtonspercubiccentimeter, SpecificWeightUnit.KilonewtonPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilonewtonsPerCubicMeter(double kilonewtonspercubicmeter) => new SpecificWeight(kilonewtonspercubicmeter, SpecificWeightUnit.KilonewtonPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilonewtonsPerCubicMillimeter(double kilonewtonspercubicmillimeter) => new SpecificWeight(kilonewtonspercubicmillimeter, SpecificWeightUnit.KilonewtonPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilopoundsForcePerCubicFoot(double kilopoundsforcepercubicfoot) => new SpecificWeight(kilopoundsforcepercubicfoot, SpecificWeightUnit.KilopoundForcePerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromKilopoundsForcePerCubicInch(double kilopoundsforcepercubicinch) => new SpecificWeight(kilopoundsforcepercubicinch, SpecificWeightUnit.KilopoundForcePerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromMeganewtonsPerCubicMeter(double meganewtonspercubicmeter) => new SpecificWeight(meganewtonspercubicmeter, SpecificWeightUnit.MeganewtonPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromNewtonsPerCubicCentimeter(double newtonspercubiccentimeter) => new SpecificWeight(newtonspercubiccentimeter, SpecificWeightUnit.NewtonPerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromNewtonsPerCubicMeter(double newtonspercubicmeter) => new SpecificWeight(newtonspercubicmeter, SpecificWeightUnit.NewtonPerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromNewtonsPerCubicMillimeter(double newtonspercubicmillimeter) => new SpecificWeight(newtonspercubicmillimeter, SpecificWeightUnit.NewtonPerCubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromPoundsForcePerCubicFoot(double poundsforcepercubicfoot) => new SpecificWeight(poundsforcepercubicfoot, SpecificWeightUnit.PoundForcePerCubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromPoundsForcePerCubicInch(double poundsforcepercubicinch) => new SpecificWeight(poundsforcepercubicinch, SpecificWeightUnit.PoundForcePerCubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromTonnesForcePerCubicCentimeter(double tonnesforcepercubiccentimeter) => new SpecificWeight(tonnesforcepercubiccentimeter, SpecificWeightUnit.TonneForcePerCubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromTonnesForcePerCubicMeter(double tonnesforcepercubicmeter) => new SpecificWeight(tonnesforcepercubicmeter, SpecificWeightUnit.TonneForcePerCubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static SpecificWeight FromTonnesForcePerCubicMillimeter(double tonnesforcepercubicmillimeter) => new SpecificWeight(tonnesforcepercubicmillimeter, SpecificWeightUnit.TonneForcePerCubicMillimeter);
///
@@ -319,14 +301,14 @@ private double GetValueInBaseUnit()
SpecificWeightUnit.KilonewtonPerCubicCentimeter => (_value * 1000000) * 1e3d,
SpecificWeightUnit.KilonewtonPerCubicMeter => (_value) * 1e3d,
SpecificWeightUnit.KilonewtonPerCubicMillimeter => (_value * 1000000000) * 1e3d,
- SpecificWeightUnit.KilopoundForcePerCubicFoot => (_value * 1.570874638462462e2) * 1e3d,
- SpecificWeightUnit.KilopoundForcePerCubicInch => (_value * 2.714471375263134e5) * 1e3d,
+ SpecificWeightUnit.KilopoundForcePerCubicFoot => (_value * 4.4482216152605 / 0.028316846592) * 1e3d,
+ SpecificWeightUnit.KilopoundForcePerCubicInch => (_value * 4.4482216152605 / 1.6387064e-5) * 1e3d,
SpecificWeightUnit.MeganewtonPerCubicMeter => (_value) * 1e6d,
SpecificWeightUnit.NewtonPerCubicCentimeter => _value * 1000000,
SpecificWeightUnit.NewtonPerCubicMeter => _value,
SpecificWeightUnit.NewtonPerCubicMillimeter => _value * 1000000000,
- SpecificWeightUnit.PoundForcePerCubicFoot => _value * 1.570874638462462e2,
- SpecificWeightUnit.PoundForcePerCubicInch => _value * 2.714471375263134e5,
+ SpecificWeightUnit.PoundForcePerCubicFoot => _value * 4.4482216152605 / 0.028316846592,
+ SpecificWeightUnit.PoundForcePerCubicInch => _value * 4.4482216152605 / 1.6387064e-5,
SpecificWeightUnit.TonneForcePerCubicCentimeter => _value * 9.80665e9,
SpecificWeightUnit.TonneForcePerCubicMeter => _value * 9.80665e3,
SpecificWeightUnit.TonneForcePerCubicMillimeter => _value * 9.80665e12,
@@ -349,14 +331,14 @@ private double GetValueAs(SpecificWeightUnit unit)
SpecificWeightUnit.KilonewtonPerCubicCentimeter => (baseUnitValue * 0.000001) / 1e3d,
SpecificWeightUnit.KilonewtonPerCubicMeter => (baseUnitValue) / 1e3d,
SpecificWeightUnit.KilonewtonPerCubicMillimeter => (baseUnitValue * 0.000000001) / 1e3d,
- SpecificWeightUnit.KilopoundForcePerCubicFoot => (baseUnitValue / 1.570874638462462e2) / 1e3d,
- SpecificWeightUnit.KilopoundForcePerCubicInch => (baseUnitValue / 2.714471375263134e5) / 1e3d,
+ SpecificWeightUnit.KilopoundForcePerCubicFoot => (baseUnitValue * 0.028316846592 / 4.4482216152605) / 1e3d,
+ SpecificWeightUnit.KilopoundForcePerCubicInch => (baseUnitValue * 1.6387064e-5 / 4.4482216152605) / 1e3d,
SpecificWeightUnit.MeganewtonPerCubicMeter => (baseUnitValue) / 1e6d,
SpecificWeightUnit.NewtonPerCubicCentimeter => baseUnitValue * 0.000001,
SpecificWeightUnit.NewtonPerCubicMeter => baseUnitValue,
SpecificWeightUnit.NewtonPerCubicMillimeter => baseUnitValue * 0.000000001,
- SpecificWeightUnit.PoundForcePerCubicFoot => baseUnitValue / 1.570874638462462e2,
- SpecificWeightUnit.PoundForcePerCubicInch => baseUnitValue / 2.714471375263134e5,
+ SpecificWeightUnit.PoundForcePerCubicFoot => baseUnitValue * 0.028316846592 / 4.4482216152605,
+ SpecificWeightUnit.PoundForcePerCubicInch => baseUnitValue * 1.6387064e-5 / 4.4482216152605,
SpecificWeightUnit.TonneForcePerCubicCentimeter => baseUnitValue / 9.80665e9,
SpecificWeightUnit.TonneForcePerCubicMeter => baseUnitValue / 9.80665e3,
SpecificWeightUnit.TonneForcePerCubicMillimeter => baseUnitValue / 9.80665e12,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Speed.g.cs
index f1f8c366be..580f3ecf5a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Speed.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Speed.g.cs
@@ -51,7 +51,6 @@ public struct Speed
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Speed(double value, SpeedUnit unit)
{
_value = value;
@@ -87,7 +86,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double CentimetersPerMinutes => As(SpeedUnit.CentimeterPerMinute);
+ public double CentimetersPerMinute => As(SpeedUnit.CentimeterPerMinute);
///
/// Gets a value of this quantity converted into
@@ -97,7 +96,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double DecimetersPerMinutes => As(SpeedUnit.DecimeterPerMinute);
+ public double DecimetersPerMinute => As(SpeedUnit.DecimeterPerMinute);
///
/// Gets a value of this quantity converted into
@@ -142,7 +141,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double KilometersPerMinutes => As(SpeedUnit.KilometerPerMinute);
+ public double KilometersPerMinute => As(SpeedUnit.KilometerPerMinute);
///
/// Gets a value of this quantity converted into
@@ -167,7 +166,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double MetersPerMinutes => As(SpeedUnit.MeterPerMinute);
+ public double MetersPerMinute => As(SpeedUnit.MeterPerMinute);
///
/// Gets a value of this quantity converted into
@@ -177,7 +176,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double MicrometersPerMinutes => As(SpeedUnit.MicrometerPerMinute);
+ public double MicrometersPerMinute => As(SpeedUnit.MicrometerPerMinute);
///
/// Gets a value of this quantity converted into
@@ -197,7 +196,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double MillimetersPerMinutes => As(SpeedUnit.MillimeterPerMinute);
+ public double MillimetersPerMinute => As(SpeedUnit.MillimeterPerMinute);
///
/// Gets a value of this quantity converted into
@@ -207,7 +206,7 @@ public Speed(double value, SpeedUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double NanometersPerMinutes => As(SpeedUnit.NanometerPerMinute);
+ public double NanometersPerMinute => As(SpeedUnit.NanometerPerMinute);
///
/// Gets a value of this quantity converted into
@@ -251,199 +250,166 @@ public Speed(double value, SpeedUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromCentimetersPerHour(double centimetersperhour) => new Speed(centimetersperhour, SpeedUnit.CentimeterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromCentimetersPerMinutes(double centimetersperminutes) => new Speed(centimetersperminutes, SpeedUnit.CentimeterPerMinute);
+ public static Speed FromCentimetersPerMinute(double centimetersperminute) => new Speed(centimetersperminute, SpeedUnit.CentimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromCentimetersPerSecond(double centimeterspersecond) => new Speed(centimeterspersecond, SpeedUnit.CentimeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromDecimetersPerMinutes(double decimetersperminutes) => new Speed(decimetersperminutes, SpeedUnit.DecimeterPerMinute);
+ public static Speed FromDecimetersPerMinute(double decimetersperminute) => new Speed(decimetersperminute, SpeedUnit.DecimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromDecimetersPerSecond(double decimeterspersecond) => new Speed(decimeterspersecond, SpeedUnit.DecimeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromFeetPerHour(double feetperhour) => new Speed(feetperhour, SpeedUnit.FootPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromFeetPerMinute(double feetperminute) => new Speed(feetperminute, SpeedUnit.FootPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromFeetPerSecond(double feetpersecond) => new Speed(feetpersecond, SpeedUnit.FootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromInchesPerHour(double inchesperhour) => new Speed(inchesperhour, SpeedUnit.InchPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromInchesPerMinute(double inchesperminute) => new Speed(inchesperminute, SpeedUnit.InchPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromInchesPerSecond(double inchespersecond) => new Speed(inchespersecond, SpeedUnit.InchPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromKilometersPerHour(double kilometersperhour) => new Speed(kilometersperhour, SpeedUnit.KilometerPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromKilometersPerMinutes(double kilometersperminutes) => new Speed(kilometersperminutes, SpeedUnit.KilometerPerMinute);
+ public static Speed FromKilometersPerMinute(double kilometersperminute) => new Speed(kilometersperminute, SpeedUnit.KilometerPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromKilometersPerSecond(double kilometerspersecond) => new Speed(kilometerspersecond, SpeedUnit.KilometerPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromKnots(double knots) => new Speed(knots, SpeedUnit.Knot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMach(double mach) => new Speed(mach, SpeedUnit.Mach);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMetersPerHour(double metersperhour) => new Speed(metersperhour, SpeedUnit.MeterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromMetersPerMinutes(double metersperminutes) => new Speed(metersperminutes, SpeedUnit.MeterPerMinute);
+ public static Speed FromMetersPerMinute(double metersperminute) => new Speed(metersperminute, SpeedUnit.MeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMetersPerSecond(double meterspersecond) => new Speed(meterspersecond, SpeedUnit.MeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromMicrometersPerMinutes(double micrometersperminutes) => new Speed(micrometersperminutes, SpeedUnit.MicrometerPerMinute);
+ public static Speed FromMicrometersPerMinute(double micrometersperminute) => new Speed(micrometersperminute, SpeedUnit.MicrometerPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMicrometersPerSecond(double micrometerspersecond) => new Speed(micrometerspersecond, SpeedUnit.MicrometerPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMilesPerHour(double milesperhour) => new Speed(milesperhour, SpeedUnit.MilePerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMillimetersPerHour(double millimetersperhour) => new Speed(millimetersperhour, SpeedUnit.MillimeterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromMillimetersPerMinutes(double millimetersperminutes) => new Speed(millimetersperminutes, SpeedUnit.MillimeterPerMinute);
+ public static Speed FromMillimetersPerMinute(double millimetersperminute) => new Speed(millimetersperminute, SpeedUnit.MillimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromMillimetersPerSecond(double millimeterspersecond) => new Speed(millimeterspersecond, SpeedUnit.MillimeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static Speed FromNanometersPerMinutes(double nanometersperminutes) => new Speed(nanometersperminutes, SpeedUnit.NanometerPerMinute);
+ public static Speed FromNanometersPerMinute(double nanometersperminute) => new Speed(nanometersperminute, SpeedUnit.NanometerPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromNanometersPerSecond(double nanometerspersecond) => new Speed(nanometerspersecond, SpeedUnit.NanometerPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromUsSurveyFeetPerHour(double ussurveyfeetperhour) => new Speed(ussurveyfeetperhour, SpeedUnit.UsSurveyFootPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromUsSurveyFeetPerMinute(double ussurveyfeetperminute) => new Speed(ussurveyfeetperminute, SpeedUnit.UsSurveyFootPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromUsSurveyFeetPerSecond(double ussurveyfeetpersecond) => new Speed(ussurveyfeetpersecond, SpeedUnit.UsSurveyFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromYardsPerHour(double yardsperhour) => new Speed(yardsperhour, SpeedUnit.YardPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromYardsPerMinute(double yardsperminute) => new Speed(yardsperminute, SpeedUnit.YardPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Speed FromYardsPerSecond(double yardspersecond) => new Speed(yardspersecond, SpeedUnit.YardPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
index 8107aeb5c8..812ae427b0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/StandardVolumeFlow.g.cs
@@ -51,7 +51,6 @@ public struct StandardVolumeFlow
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public StandardVolumeFlow(double value, StandardVolumeFlowUnit unit)
{
_value = value;
@@ -131,55 +130,46 @@ public StandardVolumeFlow(double value, StandardVolumeFlowUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicCentimetersPerMinute(double standardcubiccentimetersperminute) => new StandardVolumeFlow(standardcubiccentimetersperminute, StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicFeetPerHour(double standardcubicfeetperhour) => new StandardVolumeFlow(standardcubicfeetperhour, StandardVolumeFlowUnit.StandardCubicFootPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicFeetPerMinute(double standardcubicfeetperminute) => new StandardVolumeFlow(standardcubicfeetperminute, StandardVolumeFlowUnit.StandardCubicFootPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicFeetPerSecond(double standardcubicfeetpersecond) => new StandardVolumeFlow(standardcubicfeetpersecond, StandardVolumeFlowUnit.StandardCubicFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicMetersPerDay(double standardcubicmetersperday) => new StandardVolumeFlow(standardcubicmetersperday, StandardVolumeFlowUnit.StandardCubicMeterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicMetersPerHour(double standardcubicmetersperhour) => new StandardVolumeFlow(standardcubicmetersperhour, StandardVolumeFlowUnit.StandardCubicMeterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicMetersPerMinute(double standardcubicmetersperminute) => new StandardVolumeFlow(standardcubicmetersperminute, StandardVolumeFlowUnit.StandardCubicMeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardCubicMetersPerSecond(double standardcubicmeterspersecond) => new StandardVolumeFlow(standardcubicmeterspersecond, StandardVolumeFlowUnit.StandardCubicMeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static StandardVolumeFlow FromStandardLitersPerMinute(double standardlitersperminute) => new StandardVolumeFlow(standardlitersperminute, StandardVolumeFlowUnit.StandardLiterPerMinute);
///
@@ -223,9 +213,9 @@ private double GetValueInBaseUnit()
return Unit switch
{
StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute => _value / 6e7,
- StandardVolumeFlowUnit.StandardCubicFootPerHour => _value * 7.8657907199999087346816086183876e-6,
- StandardVolumeFlowUnit.StandardCubicFootPerMinute => _value / 2118.88000326,
- StandardVolumeFlowUnit.StandardCubicFootPerSecond => _value / 35.314666721,
+ StandardVolumeFlowUnit.StandardCubicFootPerHour => _value * 0.028316846592 / 3600,
+ StandardVolumeFlowUnit.StandardCubicFootPerMinute => _value * 0.028316846592 / 60,
+ StandardVolumeFlowUnit.StandardCubicFootPerSecond => _value * 0.028316846592,
StandardVolumeFlowUnit.StandardCubicMeterPerDay => _value / 86400,
StandardVolumeFlowUnit.StandardCubicMeterPerHour => _value / 3600,
StandardVolumeFlowUnit.StandardCubicMeterPerMinute => _value / 60,
@@ -245,9 +235,9 @@ private double GetValueAs(StandardVolumeFlowUnit unit)
return unit switch
{
StandardVolumeFlowUnit.StandardCubicCentimeterPerMinute => baseUnitValue * 6e7,
- StandardVolumeFlowUnit.StandardCubicFootPerHour => baseUnitValue / 7.8657907199999087346816086183876e-6,
- StandardVolumeFlowUnit.StandardCubicFootPerMinute => baseUnitValue * 2118.88000326,
- StandardVolumeFlowUnit.StandardCubicFootPerSecond => baseUnitValue * 35.314666721,
+ StandardVolumeFlowUnit.StandardCubicFootPerHour => baseUnitValue / (0.028316846592 / 3600),
+ StandardVolumeFlowUnit.StandardCubicFootPerMinute => baseUnitValue / (0.028316846592 / 60),
+ StandardVolumeFlowUnit.StandardCubicFootPerSecond => baseUnitValue / 0.028316846592,
StandardVolumeFlowUnit.StandardCubicMeterPerDay => baseUnitValue * 86400,
StandardVolumeFlowUnit.StandardCubicMeterPerHour => baseUnitValue * 3600,
StandardVolumeFlowUnit.StandardCubicMeterPerMinute => baseUnitValue * 60,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Temperature.g.cs
index 3ee4f27a07..336add8625 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Temperature.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Temperature.g.cs
@@ -51,7 +51,6 @@ public struct Temperature
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Temperature(double value, TemperatureUnit unit)
{
_value = value;
@@ -136,61 +135,51 @@ public Temperature(double value, TemperatureUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesCelsius(double degreescelsius) => new Temperature(degreescelsius, TemperatureUnit.DegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesDelisle(double degreesdelisle) => new Temperature(degreesdelisle, TemperatureUnit.DegreeDelisle);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesFahrenheit(double degreesfahrenheit) => new Temperature(degreesfahrenheit, TemperatureUnit.DegreeFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesNewton(double degreesnewton) => new Temperature(degreesnewton, TemperatureUnit.DegreeNewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesRankine(double degreesrankine) => new Temperature(degreesrankine, TemperatureUnit.DegreeRankine);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesReaumur(double degreesreaumur) => new Temperature(degreesreaumur, TemperatureUnit.DegreeReaumur);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromDegreesRoemer(double degreesroemer) => new Temperature(degreesroemer, TemperatureUnit.DegreeRoemer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromKelvins(double kelvins) => new Temperature(kelvins, TemperatureUnit.Kelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromMillidegreesCelsius(double millidegreescelsius) => new Temperature(millidegreescelsius, TemperatureUnit.MillidegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Temperature FromSolarTemperatures(double solartemperatures) => new Temperature(solartemperatures, TemperatureUnit.SolarTemperature);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
index e809196ec4..3f4944fe5e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureChangeRate.g.cs
@@ -51,7 +51,6 @@ public struct TemperatureChangeRate
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public TemperatureChangeRate(double value, TemperatureChangeRateUnit unit)
{
_value = value;
@@ -171,103 +170,86 @@ public TemperatureChangeRate(double value, TemperatureChangeRateUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromCentidegreesCelsiusPerSecond(double centidegreescelsiuspersecond) => new TemperatureChangeRate(centidegreescelsiuspersecond, TemperatureChangeRateUnit.CentidegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDecadegreesCelsiusPerSecond(double decadegreescelsiuspersecond) => new TemperatureChangeRate(decadegreescelsiuspersecond, TemperatureChangeRateUnit.DecadegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDecidegreesCelsiusPerSecond(double decidegreescelsiuspersecond) => new TemperatureChangeRate(decidegreescelsiuspersecond, TemperatureChangeRateUnit.DecidegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesCelsiusPerHour(double degreescelsiusperhour) => new TemperatureChangeRate(degreescelsiusperhour, TemperatureChangeRateUnit.DegreeCelsiusPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesCelsiusPerMinute(double degreescelsiusperminute) => new TemperatureChangeRate(degreescelsiusperminute, TemperatureChangeRateUnit.DegreeCelsiusPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesCelsiusPerSecond(double degreescelsiuspersecond) => new TemperatureChangeRate(degreescelsiuspersecond, TemperatureChangeRateUnit.DegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesFahrenheitPerHour(double degreesfahrenheitperhour) => new TemperatureChangeRate(degreesfahrenheitperhour, TemperatureChangeRateUnit.DegreeFahrenheitPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesFahrenheitPerMinute(double degreesfahrenheitperminute) => new TemperatureChangeRate(degreesfahrenheitperminute, TemperatureChangeRateUnit.DegreeFahrenheitPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesFahrenheitPerSecond(double degreesfahrenheitpersecond) => new TemperatureChangeRate(degreesfahrenheitpersecond, TemperatureChangeRateUnit.DegreeFahrenheitPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesKelvinPerHour(double degreeskelvinperhour) => new TemperatureChangeRate(degreeskelvinperhour, TemperatureChangeRateUnit.DegreeKelvinPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesKelvinPerMinute(double degreeskelvinperminute) => new TemperatureChangeRate(degreeskelvinperminute, TemperatureChangeRateUnit.DegreeKelvinPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromDegreesKelvinPerSecond(double degreeskelvinpersecond) => new TemperatureChangeRate(degreeskelvinpersecond, TemperatureChangeRateUnit.DegreeKelvinPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromHectodegreesCelsiusPerSecond(double hectodegreescelsiuspersecond) => new TemperatureChangeRate(hectodegreescelsiuspersecond, TemperatureChangeRateUnit.HectodegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromKilodegreesCelsiusPerSecond(double kilodegreescelsiuspersecond) => new TemperatureChangeRate(kilodegreescelsiuspersecond, TemperatureChangeRateUnit.KilodegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromMicrodegreesCelsiusPerSecond(double microdegreescelsiuspersecond) => new TemperatureChangeRate(microdegreescelsiuspersecond, TemperatureChangeRateUnit.MicrodegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromMillidegreesCelsiusPerSecond(double millidegreescelsiuspersecond) => new TemperatureChangeRate(millidegreescelsiuspersecond, TemperatureChangeRateUnit.MillidegreeCelsiusPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureChangeRate FromNanodegreesCelsiusPerSecond(double nanodegreescelsiuspersecond) => new TemperatureChangeRate(nanodegreescelsiuspersecond, TemperatureChangeRateUnit.NanodegreeCelsiusPerSecond);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureDelta.g.cs
index 986c40c94e..09c5092e05 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureDelta.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureDelta.g.cs
@@ -51,7 +51,6 @@ public struct TemperatureDelta
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public TemperatureDelta(double value, TemperatureDeltaUnit unit)
{
_value = value;
@@ -131,55 +130,46 @@ public TemperatureDelta(double value, TemperatureDeltaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesCelsius(double degreescelsius) => new TemperatureDelta(degreescelsius, TemperatureDeltaUnit.DegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesDelisle(double degreesdelisle) => new TemperatureDelta(degreesdelisle, TemperatureDeltaUnit.DegreeDelisle);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesFahrenheit(double degreesfahrenheit) => new TemperatureDelta(degreesfahrenheit, TemperatureDeltaUnit.DegreeFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesNewton(double degreesnewton) => new TemperatureDelta(degreesnewton, TemperatureDeltaUnit.DegreeNewton);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesRankine(double degreesrankine) => new TemperatureDelta(degreesrankine, TemperatureDeltaUnit.DegreeRankine);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesReaumur(double degreesreaumur) => new TemperatureDelta(degreesreaumur, TemperatureDeltaUnit.DegreeReaumur);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromDegreesRoemer(double degreesroemer) => new TemperatureDelta(degreesroemer, TemperatureDeltaUnit.DegreeRoemer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromKelvins(double kelvins) => new TemperatureDelta(kelvins, TemperatureDeltaUnit.Kelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureDelta FromMillidegreesCelsius(double millidegreescelsius) => new TemperatureDelta(millidegreescelsius, TemperatureDeltaUnit.MillidegreeCelsius);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureGradient.g.cs
index 4291eaff03..54b4f58c93 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureGradient.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TemperatureGradient.g.cs
@@ -51,7 +51,6 @@ public struct TemperatureGradient
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public TemperatureGradient(double value, TemperatureGradientUnit unit)
{
_value = value;
@@ -82,12 +81,12 @@ public TemperatureGradient(double value, TemperatureGradientUnit unit)
///
/// Gets a value of this quantity converted into
///
- public double DegreesCelciusPerKilometer => As(TemperatureGradientUnit.DegreeCelsiusPerKilometer);
+ public double DegreesCelsiusPerKilometer => As(TemperatureGradientUnit.DegreeCelsiusPerKilometer);
///
/// Gets a value of this quantity converted into
///
- public double DegreesCelciusPerMeter => As(TemperatureGradientUnit.DegreeCelsiusPerMeter);
+ public double DegreesCelsiusPerMeter => As(TemperatureGradientUnit.DegreeCelsiusPerMeter);
///
/// Gets a value of this quantity converted into
@@ -106,25 +105,21 @@ public TemperatureGradient(double value, TemperatureGradientUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static TemperatureGradient FromDegreesCelciusPerKilometer(double degreescelciusperkilometer) => new TemperatureGradient(degreescelciusperkilometer, TemperatureGradientUnit.DegreeCelsiusPerKilometer);
+ public static TemperatureGradient FromDegreesCelsiusPerKilometer(double degreescelsiusperkilometer) => new TemperatureGradient(degreescelsiusperkilometer, TemperatureGradientUnit.DegreeCelsiusPerKilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
- public static TemperatureGradient FromDegreesCelciusPerMeter(double degreescelciuspermeter) => new TemperatureGradient(degreescelciuspermeter, TemperatureGradientUnit.DegreeCelsiusPerMeter);
+ public static TemperatureGradient FromDegreesCelsiusPerMeter(double degreescelsiuspermeter) => new TemperatureGradient(degreescelsiuspermeter, TemperatureGradientUnit.DegreeCelsiusPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureGradient FromDegreesFahrenheitPerFoot(double degreesfahrenheitperfoot) => new TemperatureGradient(degreesfahrenheitperfoot, TemperatureGradientUnit.DegreeFahrenheitPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TemperatureGradient FromKelvinsPerMeter(double kelvinspermeter) => new TemperatureGradient(kelvinspermeter, TemperatureGradientUnit.KelvinPerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalConductivity.g.cs
index 8d51df2b7d..57649f3065 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalConductivity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalConductivity.g.cs
@@ -54,7 +54,6 @@ public struct ThermalConductivity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public ThermalConductivity(double value, ThermalConductivityUnit unit)
{
_value = value;
@@ -99,13 +98,11 @@ public ThermalConductivity(double value, ThermalConductivityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ThermalConductivity FromBtusPerHourFootFahrenheit(double btusperhourfootfahrenheit) => new ThermalConductivity(btusperhourfootfahrenheit, ThermalConductivityUnit.BtuPerHourFootFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static ThermalConductivity FromWattsPerMeterKelvin(double wattspermeterkelvin) => new ThermalConductivity(wattspermeterkelvin, ThermalConductivityUnit.WattPerMeterKelvin);
///
@@ -148,7 +145,7 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- ThermalConductivityUnit.BtuPerHourFootFahrenheit => _value * 1.73073467,
+ ThermalConductivityUnit.BtuPerHourFootFahrenheit => _value * ((1055.05585262 / (0.3048 * 3600)) * 1.8),
ThermalConductivityUnit.WattPerMeterKelvin => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -163,7 +160,7 @@ private double GetValueAs(ThermalConductivityUnit unit)
return unit switch
{
- ThermalConductivityUnit.BtuPerHourFootFahrenheit => baseUnitValue / 1.73073467,
+ ThermalConductivityUnit.BtuPerHourFootFahrenheit => baseUnitValue / ((1055.05585262 / (0.3048 * 3600)) * 1.8),
ThermalConductivityUnit.WattPerMeterKelvin => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalInsulance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalInsulance.g.cs
new file mode 100644
index 0000000000..e415f67581
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalInsulance.g.cs
@@ -0,0 +1,217 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
+// Licensed under MIT No Attribution, see LICENSE file at the root.
+// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
+
+using System;
+using UnitsNet.Units;
+
+namespace UnitsNet
+{
+ ///
+ ///
+ /// Thermal insulance (R-value) is a measure of a material's resistance to the heat current. It quantifies how effectively a material can resist the transfer of heat through conduction, convection, and radiation. It has the units square metre kelvins per watt (m2⋅K/W) in SI units or square foot degree Fahrenheit–hours per British thermal unit (ft2⋅°F⋅h/Btu) in imperial units. The higher the thermal insulance, the better a material insulates against heat transfer. It is commonly used in construction to assess the insulation properties of materials such as walls, roofs, and insulation products.
+ ///
+ public struct ThermalInsulance
+ {
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ private readonly double _value;
+
+ ///
+ /// The unit this quantity was constructed with.
+ ///
+ private readonly ThermalInsulanceUnit _unit;
+
+ ///
+ /// The numeric value this quantity was constructed with.
+ ///
+ public double Value => _value;
+
+ ///
+ public ThermalInsulanceUnit Unit => _unit;
+
+ ///
+ /// Creates the quantity with the given numeric value and unit.
+ ///
+ /// The numeric value to construct this quantity with.
+ /// The unit representation to construct this quantity with.
+ public ThermalInsulance(double value, ThermalInsulanceUnit unit)
+ {
+ _value = value;
+ _unit = unit;
+ }
+
+ ///
+ /// The base unit of ThermalInsulance, which is Second. All conversions go via this value.
+ ///
+ public static ThermalInsulanceUnit BaseUnit { get; } = ThermalInsulanceUnit.SquareMeterKelvinPerKilowatt;
+
+ ///
+ /// Represents the largest possible value of ThermalInsulance.
+ ///
+ public static ThermalInsulance MaxValue { get; } = new ThermalInsulance(double.MaxValue, BaseUnit);
+
+ ///
+ /// Represents the smallest possible value of ThermalInsulance.
+ ///
+ public static ThermalInsulance MinValue { get; } = new ThermalInsulance(double.MinValue, BaseUnit);
+
+ ///
+ /// Gets an instance of this quantity with a value of 0 in the base unit Second.
+ ///
+ public static ThermalInsulance Zero { get; } = new ThermalInsulance(0, BaseUnit);
+ #region Conversion Properties
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double HourSquareFeetDegreesFahrenheitPerBtu => As(ThermalInsulanceUnit.HourSquareFeetDegreeFahrenheitPerBtu);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double SquareCentimeterHourDegreesCelsiusPerKilocalorie => As(ThermalInsulanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double SquareCentimeterKelvinsPerWatt => As(ThermalInsulanceUnit.SquareCentimeterKelvinPerWatt);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double SquareMeterDegreesCelsiusPerWatt => As(ThermalInsulanceUnit.SquareMeterDegreeCelsiusPerWatt);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double SquareMeterKelvinsPerKilowatt => As(ThermalInsulanceUnit.SquareMeterKelvinPerKilowatt);
+
+ ///
+ /// Gets a value of this quantity converted into
+ ///
+ public double SquareMeterKelvinsPerWatt => As(ThermalInsulanceUnit.SquareMeterKelvinPerWatt);
+
+ #endregion
+
+ #region Static Factory Methods
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromHourSquareFeetDegreesFahrenheitPerBtu(double hoursquarefeetdegreesfahrenheitperbtu) => new ThermalInsulance(hoursquarefeetdegreesfahrenheitperbtu, ThermalInsulanceUnit.HourSquareFeetDegreeFahrenheitPerBtu);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(double squarecentimeterhourdegreescelsiusperkilocalorie) => new ThermalInsulance(squarecentimeterhourdegreescelsiusperkilocalorie, ThermalInsulanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromSquareCentimeterKelvinsPerWatt(double squarecentimeterkelvinsperwatt) => new ThermalInsulance(squarecentimeterkelvinsperwatt, ThermalInsulanceUnit.SquareCentimeterKelvinPerWatt);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromSquareMeterDegreesCelsiusPerWatt(double squaremeterdegreescelsiusperwatt) => new ThermalInsulance(squaremeterdegreescelsiusperwatt, ThermalInsulanceUnit.SquareMeterDegreeCelsiusPerWatt);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromSquareMeterKelvinsPerKilowatt(double squaremeterkelvinsperkilowatt) => new ThermalInsulance(squaremeterkelvinsperkilowatt, ThermalInsulanceUnit.SquareMeterKelvinPerKilowatt);
+
+ ///
+ /// Creates a from .
+ ///
+ public static ThermalInsulance FromSquareMeterKelvinsPerWatt(double squaremeterkelvinsperwatt) => new ThermalInsulance(squaremeterkelvinsperwatt, ThermalInsulanceUnit.SquareMeterKelvinPerWatt);
+
+ ///
+ /// Dynamically convert from value and unit enum to .
+ ///
+ /// Value to convert from.
+ /// Unit to convert from.
+ /// ThermalInsulance unit value.
+ public static ThermalInsulance From(double value, ThermalInsulanceUnit fromUnit)
+ {
+ return new ThermalInsulance(value, fromUnit);
+ }
+
+ #endregion
+
+ #region Conversion Methods
+
+ ///
+ /// Convert to the unit representation .
+ ///
+ /// Value converted to the specified unit.
+ public double As(ThermalInsulanceUnit unit) => GetValueAs(unit);
+
+ ///
+ /// Converts this ThermalInsulance to another ThermalInsulance with the unit representation .
+ ///
+ /// A ThermalInsulance with the specified unit.
+ public ThermalInsulance ToUnit(ThermalInsulanceUnit unit)
+ {
+ var convertedValue = GetValueAs(unit);
+ return new ThermalInsulance(convertedValue, unit);
+ }
+
+ ///
+ /// Converts the current value + unit to the base unit.
+ /// This is typically the first step in converting from one unit to another.
+ ///
+ /// The value in the base unit representation.
+ private double GetValueInBaseUnit()
+ {
+ return Unit switch
+ {
+ ThermalInsulanceUnit.HourSquareFeetDegreeFahrenheitPerBtu => _value * (1000 * 0.3048 * 0.3048 * 3600) / (1055.05585262 * 1.8),
+ ThermalInsulanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie => _value * (0.0001 * 3600) / 4.184,
+ ThermalInsulanceUnit.SquareCentimeterKelvinPerWatt => _value * 0.1,
+ ThermalInsulanceUnit.SquareMeterDegreeCelsiusPerWatt => _value * 1000.0,
+ ThermalInsulanceUnit.SquareMeterKelvinPerKilowatt => _value,
+ ThermalInsulanceUnit.SquareMeterKelvinPerWatt => _value * 1000,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
+ };
+ }
+
+ private double GetValueAs(ThermalInsulanceUnit unit)
+ {
+ if (Unit == unit)
+ return _value;
+
+ var baseUnitValue = GetValueInBaseUnit();
+
+ return unit switch
+ {
+ ThermalInsulanceUnit.HourSquareFeetDegreeFahrenheitPerBtu => baseUnitValue * (1055.05585262 * 1.8) / (1000 * 0.3048 * 0.3048 * 3600),
+ ThermalInsulanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie => baseUnitValue * 4.184 / (0.0001 * 3600),
+ ThermalInsulanceUnit.SquareCentimeterKelvinPerWatt => baseUnitValue / 0.1,
+ ThermalInsulanceUnit.SquareMeterDegreeCelsiusPerWatt => baseUnitValue / 1000.0,
+ ThermalInsulanceUnit.SquareMeterKelvinPerKilowatt => baseUnitValue,
+ ThermalInsulanceUnit.SquareMeterKelvinPerWatt => baseUnitValue / 1000,
+ _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
+ };
+ }
+
+ #endregion
+ }
+}
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalResistance.g.cs
deleted file mode 100644
index 6e1cdffac5..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/ThermalResistance.g.cs
+++ /dev/null
@@ -1,224 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using System;
-using UnitsNet.Units;
-
-namespace UnitsNet
-{
- ///
- ///
- /// Heat Transfer Coefficient or Thermal conductivity - indicates a materials ability to conduct heat.
- ///
- public struct ThermalResistance
- {
- ///
- /// The numeric value this quantity was constructed with.
- ///
- private readonly double _value;
-
- ///
- /// The unit this quantity was constructed with.
- ///
- private readonly ThermalResistanceUnit _unit;
-
- ///
- /// The numeric value this quantity was constructed with.
- ///
- public double Value => _value;
-
- ///
- public ThermalResistanceUnit Unit => _unit;
-
- ///
- /// Creates the quantity with the given numeric value and unit.
- ///
- /// The numeric value to construct this quantity with.
- /// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
- public ThermalResistance(double value, ThermalResistanceUnit unit)
- {
- _value = value;
- _unit = unit;
- }
-
- ///
- /// The base unit of ThermalResistance, which is Second. All conversions go via this value.
- ///
- public static ThermalResistanceUnit BaseUnit { get; } = ThermalResistanceUnit.SquareMeterKelvinPerKilowatt;
-
- ///
- /// Represents the largest possible value of ThermalResistance.
- ///
- public static ThermalResistance MaxValue { get; } = new ThermalResistance(double.MaxValue, BaseUnit);
-
- ///
- /// Represents the smallest possible value of ThermalResistance.
- ///
- public static ThermalResistance MinValue { get; } = new ThermalResistance(double.MinValue, BaseUnit);
-
- ///
- /// Gets an instance of this quantity with a value of 0 in the base unit Second.
- ///
- public static ThermalResistance Zero { get; } = new ThermalResistance(0, BaseUnit);
- #region Conversion Properties
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double HourSquareFeetDegreesFahrenheitPerBtu => As(ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double SquareCentimeterHourDegreesCelsiusPerKilocalorie => As(ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double SquareCentimeterKelvinsPerWatt => As(ThermalResistanceUnit.SquareCentimeterKelvinPerWatt);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double SquareMeterDegreesCelsiusPerWatt => As(ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double SquareMeterKelvinsPerKilowatt => As(ThermalResistanceUnit.SquareMeterKelvinPerKilowatt);
-
- ///
- /// Gets a value of this quantity converted into
- ///
- public double SquareMeterKelvinsPerWatt => As(ThermalResistanceUnit.SquareMeterKelvinPerWatt);
-
- #endregion
-
- #region Static Factory Methods
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromHourSquareFeetDegreesFahrenheitPerBtu(double hoursquarefeetdegreesfahrenheitperbtu) => new ThermalResistance(hoursquarefeetdegreesfahrenheitperbtu, ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(double squarecentimeterhourdegreescelsiusperkilocalorie) => new ThermalResistance(squarecentimeterhourdegreescelsiusperkilocalorie, ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromSquareCentimeterKelvinsPerWatt(double squarecentimeterkelvinsperwatt) => new ThermalResistance(squarecentimeterkelvinsperwatt, ThermalResistanceUnit.SquareCentimeterKelvinPerWatt);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromSquareMeterDegreesCelsiusPerWatt(double squaremeterdegreescelsiusperwatt) => new ThermalResistance(squaremeterdegreescelsiusperwatt, ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromSquareMeterKelvinsPerKilowatt(double squaremeterkelvinsperkilowatt) => new ThermalResistance(squaremeterkelvinsperkilowatt, ThermalResistanceUnit.SquareMeterKelvinPerKilowatt);
-
- ///
- /// Creates a from .
- ///
- /// If value is NaN or Infinity.
- public static ThermalResistance FromSquareMeterKelvinsPerWatt(double squaremeterkelvinsperwatt) => new ThermalResistance(squaremeterkelvinsperwatt, ThermalResistanceUnit.SquareMeterKelvinPerWatt);
-
- ///
- /// Dynamically convert from value and unit enum to .
- ///
- /// Value to convert from.
- /// Unit to convert from.
- /// ThermalResistance unit value.
- public static ThermalResistance From(double value, ThermalResistanceUnit fromUnit)
- {
- return new ThermalResistance(value, fromUnit);
- }
-
- #endregion
-
- #region Conversion Methods
-
- ///
- /// Convert to the unit representation .
- ///
- /// Value converted to the specified unit.
- public double As(ThermalResistanceUnit unit) => GetValueAs(unit);
-
- ///
- /// Converts this ThermalResistance to another ThermalResistance with the unit representation .
- ///
- /// A ThermalResistance with the specified unit.
- public ThermalResistance ToUnit(ThermalResistanceUnit unit)
- {
- var convertedValue = GetValueAs(unit);
- return new ThermalResistance(convertedValue, unit);
- }
-
- ///
- /// Converts the current value + unit to the base unit.
- /// This is typically the first step in converting from one unit to another.
- ///
- /// The value in the base unit representation.
- private double GetValueInBaseUnit()
- {
- return Unit switch
- {
- ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu => _value * 176.1121482159839,
- ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie => _value * 0.0859779507590433,
- ThermalResistanceUnit.SquareCentimeterKelvinPerWatt => _value * 0.1,
- ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt => _value * 1000.0,
- ThermalResistanceUnit.SquareMeterKelvinPerKilowatt => _value,
- ThermalResistanceUnit.SquareMeterKelvinPerWatt => _value * 1000,
- _ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
- };
- }
-
- private double GetValueAs(ThermalResistanceUnit unit)
- {
- if (Unit == unit)
- return _value;
-
- var baseUnitValue = GetValueInBaseUnit();
-
- return unit switch
- {
- ThermalResistanceUnit.HourSquareFeetDegreeFahrenheitPerBtu => baseUnitValue / 176.1121482159839,
- ThermalResistanceUnit.SquareCentimeterHourDegreeCelsiusPerKilocalorie => baseUnitValue / 0.0859779507590433,
- ThermalResistanceUnit.SquareCentimeterKelvinPerWatt => baseUnitValue / 0.1,
- ThermalResistanceUnit.SquareMeterDegreeCelsiusPerWatt => baseUnitValue / 1000.0,
- ThermalResistanceUnit.SquareMeterKelvinPerKilowatt => baseUnitValue,
- ThermalResistanceUnit.SquareMeterKelvinPerWatt => baseUnitValue / 1000,
- _ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
- };
- }
-
- #endregion
- }
-}
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Torque.g.cs
index 3110da8adc..85de00a66a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Torque.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Torque.g.cs
@@ -51,7 +51,6 @@ public struct Torque
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Torque(double value, TorqueUnit unit)
{
_value = value;
@@ -211,151 +210,126 @@ public Torque(double value, TorqueUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromGramForceCentimeters(double gramforcecentimeters) => new Torque(gramforcecentimeters, TorqueUnit.GramForceCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromGramForceMeters(double gramforcemeters) => new Torque(gramforcemeters, TorqueUnit.GramForceMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromGramForceMillimeters(double gramforcemillimeters) => new Torque(gramforcemillimeters, TorqueUnit.GramForceMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilogramForceCentimeters(double kilogramforcecentimeters) => new Torque(kilogramforcecentimeters, TorqueUnit.KilogramForceCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilogramForceMeters(double kilogramforcemeters) => new Torque(kilogramforcemeters, TorqueUnit.KilogramForceMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilogramForceMillimeters(double kilogramforcemillimeters) => new Torque(kilogramforcemillimeters, TorqueUnit.KilogramForceMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilonewtonCentimeters(double kilonewtoncentimeters) => new Torque(kilonewtoncentimeters, TorqueUnit.KilonewtonCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilonewtonMeters(double kilonewtonmeters) => new Torque(kilonewtonmeters, TorqueUnit.KilonewtonMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilonewtonMillimeters(double kilonewtonmillimeters) => new Torque(kilonewtonmillimeters, TorqueUnit.KilonewtonMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilopoundForceFeet(double kilopoundforcefeet) => new Torque(kilopoundforcefeet, TorqueUnit.KilopoundForceFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromKilopoundForceInches(double kilopoundforceinches) => new Torque(kilopoundforceinches, TorqueUnit.KilopoundForceInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromMeganewtonCentimeters(double meganewtoncentimeters) => new Torque(meganewtoncentimeters, TorqueUnit.MeganewtonCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromMeganewtonMeters(double meganewtonmeters) => new Torque(meganewtonmeters, TorqueUnit.MeganewtonMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromMeganewtonMillimeters(double meganewtonmillimeters) => new Torque(meganewtonmillimeters, TorqueUnit.MeganewtonMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromMegapoundForceFeet(double megapoundforcefeet) => new Torque(megapoundforcefeet, TorqueUnit.MegapoundForceFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromMegapoundForceInches(double megapoundforceinches) => new Torque(megapoundforceinches, TorqueUnit.MegapoundForceInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromNewtonCentimeters(double newtoncentimeters) => new Torque(newtoncentimeters, TorqueUnit.NewtonCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromNewtonMeters(double newtonmeters) => new Torque(newtonmeters, TorqueUnit.NewtonMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromNewtonMillimeters(double newtonmillimeters) => new Torque(newtonmillimeters, TorqueUnit.NewtonMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromPoundalFeet(double poundalfeet) => new Torque(poundalfeet, TorqueUnit.PoundalFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromPoundForceFeet(double poundforcefeet) => new Torque(poundforcefeet, TorqueUnit.PoundForceFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromPoundForceInches(double poundforceinches) => new Torque(poundforceinches, TorqueUnit.PoundForceInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromTonneForceCentimeters(double tonneforcecentimeters) => new Torque(tonneforcecentimeters, TorqueUnit.TonneForceCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromTonneForceMeters(double tonneforcemeters) => new Torque(tonneforcemeters, TorqueUnit.TonneForceMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Torque FromTonneForceMillimeters(double tonneforcemillimeters) => new Torque(tonneforcemillimeters, TorqueUnit.TonneForceMillimeter);
///
@@ -407,19 +381,19 @@ private double GetValueInBaseUnit()
TorqueUnit.KilonewtonCentimeter => (_value * 0.01) * 1e3d,
TorqueUnit.KilonewtonMeter => (_value) * 1e3d,
TorqueUnit.KilonewtonMillimeter => (_value * 0.001) * 1e3d,
- TorqueUnit.KilopoundForceFoot => (_value * 1.3558179483314) * 1e3d,
- TorqueUnit.KilopoundForceInch => (_value * 1.129848290276167e-1) * 1e3d,
+ TorqueUnit.KilopoundForceFoot => (_value * 4.4482216152605 * 0.3048) * 1e3d,
+ TorqueUnit.KilopoundForceInch => (_value * 4.4482216152605 * 2.54e-2) * 1e3d,
TorqueUnit.MeganewtonCentimeter => (_value * 0.01) * 1e6d,
TorqueUnit.MeganewtonMeter => (_value) * 1e6d,
TorqueUnit.MeganewtonMillimeter => (_value * 0.001) * 1e6d,
- TorqueUnit.MegapoundForceFoot => (_value * 1.3558179483314) * 1e6d,
- TorqueUnit.MegapoundForceInch => (_value * 1.129848290276167e-1) * 1e6d,
+ TorqueUnit.MegapoundForceFoot => (_value * 4.4482216152605 * 0.3048) * 1e6d,
+ TorqueUnit.MegapoundForceInch => (_value * 4.4482216152605 * 2.54e-2) * 1e6d,
TorqueUnit.NewtonCentimeter => _value * 0.01,
TorqueUnit.NewtonMeter => _value,
TorqueUnit.NewtonMillimeter => _value * 0.001,
- TorqueUnit.PoundalFoot => _value * 4.21401100938048e-2,
- TorqueUnit.PoundForceFoot => _value * 1.3558179483314,
- TorqueUnit.PoundForceInch => _value * 1.129848290276167e-1,
+ TorqueUnit.PoundalFoot => _value * 0.138254954376 * 0.3048,
+ TorqueUnit.PoundForceFoot => _value * 4.4482216152605 * 0.3048,
+ TorqueUnit.PoundForceInch => _value * 4.4482216152605 * 2.54e-2,
TorqueUnit.TonneForceCentimeter => _value * 9.80665e1,
TorqueUnit.TonneForceMeter => _value * 9.80665e3,
TorqueUnit.TonneForceMillimeter => _value * 9.80665,
@@ -445,19 +419,19 @@ private double GetValueAs(TorqueUnit unit)
TorqueUnit.KilonewtonCentimeter => (baseUnitValue * 100) / 1e3d,
TorqueUnit.KilonewtonMeter => (baseUnitValue) / 1e3d,
TorqueUnit.KilonewtonMillimeter => (baseUnitValue * 1000) / 1e3d,
- TorqueUnit.KilopoundForceFoot => (baseUnitValue / 1.3558179483314) / 1e3d,
- TorqueUnit.KilopoundForceInch => (baseUnitValue / 1.129848290276167e-1) / 1e3d,
+ TorqueUnit.KilopoundForceFoot => (baseUnitValue / (4.4482216152605 * 0.3048)) / 1e3d,
+ TorqueUnit.KilopoundForceInch => (baseUnitValue / (4.4482216152605 * 2.54e-2)) / 1e3d,
TorqueUnit.MeganewtonCentimeter => (baseUnitValue * 100) / 1e6d,
TorqueUnit.MeganewtonMeter => (baseUnitValue) / 1e6d,
TorqueUnit.MeganewtonMillimeter => (baseUnitValue * 1000) / 1e6d,
- TorqueUnit.MegapoundForceFoot => (baseUnitValue / 1.3558179483314) / 1e6d,
- TorqueUnit.MegapoundForceInch => (baseUnitValue / 1.129848290276167e-1) / 1e6d,
+ TorqueUnit.MegapoundForceFoot => (baseUnitValue / (4.4482216152605 * 0.3048)) / 1e6d,
+ TorqueUnit.MegapoundForceInch => (baseUnitValue / (4.4482216152605 * 2.54e-2)) / 1e6d,
TorqueUnit.NewtonCentimeter => baseUnitValue * 100,
TorqueUnit.NewtonMeter => baseUnitValue,
TorqueUnit.NewtonMillimeter => baseUnitValue * 1000,
- TorqueUnit.PoundalFoot => baseUnitValue / 4.21401100938048e-2,
- TorqueUnit.PoundForceFoot => baseUnitValue / 1.3558179483314,
- TorqueUnit.PoundForceInch => baseUnitValue / 1.129848290276167e-1,
+ TorqueUnit.PoundalFoot => baseUnitValue / (0.138254954376 * 0.3048),
+ TorqueUnit.PoundForceFoot => baseUnitValue / (4.4482216152605 * 0.3048),
+ TorqueUnit.PoundForceInch => baseUnitValue / (4.4482216152605 * 2.54e-2),
TorqueUnit.TonneForceCentimeter => baseUnitValue / 9.80665e1,
TorqueUnit.TonneForceMeter => baseUnitValue / 9.80665e3,
TorqueUnit.TonneForceMillimeter => baseUnitValue / 9.80665,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TorquePerLength.g.cs
index f913bf039d..efda0c641c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/TorquePerLength.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/TorquePerLength.g.cs
@@ -51,7 +51,6 @@ public struct TorquePerLength
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public TorquePerLength(double value, TorquePerLengthUnit unit)
{
_value = value;
@@ -191,127 +190,106 @@ public TorquePerLength(double value, TorquePerLengthUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilogramForceCentimetersPerMeter(double kilogramforcecentimeterspermeter) => new TorquePerLength(kilogramforcecentimeterspermeter, TorquePerLengthUnit.KilogramForceCentimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilogramForceMetersPerMeter(double kilogramforcemeterspermeter) => new TorquePerLength(kilogramforcemeterspermeter, TorquePerLengthUnit.KilogramForceMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilogramForceMillimetersPerMeter(double kilogramforcemillimeterspermeter) => new TorquePerLength(kilogramforcemillimeterspermeter, TorquePerLengthUnit.KilogramForceMillimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilonewtonCentimetersPerMeter(double kilonewtoncentimeterspermeter) => new TorquePerLength(kilonewtoncentimeterspermeter, TorquePerLengthUnit.KilonewtonCentimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilonewtonMetersPerMeter(double kilonewtonmeterspermeter) => new TorquePerLength(kilonewtonmeterspermeter, TorquePerLengthUnit.KilonewtonMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilonewtonMillimetersPerMeter(double kilonewtonmillimeterspermeter) => new TorquePerLength(kilonewtonmillimeterspermeter, TorquePerLengthUnit.KilonewtonMillimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilopoundForceFeetPerFoot(double kilopoundforcefeetperfoot) => new TorquePerLength(kilopoundforcefeetperfoot, TorquePerLengthUnit.KilopoundForceFootPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromKilopoundForceInchesPerFoot(double kilopoundforceinchesperfoot) => new TorquePerLength(kilopoundforceinchesperfoot, TorquePerLengthUnit.KilopoundForceInchPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromMeganewtonCentimetersPerMeter(double meganewtoncentimeterspermeter) => new TorquePerLength(meganewtoncentimeterspermeter, TorquePerLengthUnit.MeganewtonCentimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromMeganewtonMetersPerMeter(double meganewtonmeterspermeter) => new TorquePerLength(meganewtonmeterspermeter, TorquePerLengthUnit.MeganewtonMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromMeganewtonMillimetersPerMeter(double meganewtonmillimeterspermeter) => new TorquePerLength(meganewtonmillimeterspermeter, TorquePerLengthUnit.MeganewtonMillimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromMegapoundForceFeetPerFoot(double megapoundforcefeetperfoot) => new TorquePerLength(megapoundforcefeetperfoot, TorquePerLengthUnit.MegapoundForceFootPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromMegapoundForceInchesPerFoot(double megapoundforceinchesperfoot) => new TorquePerLength(megapoundforceinchesperfoot, TorquePerLengthUnit.MegapoundForceInchPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromNewtonCentimetersPerMeter(double newtoncentimeterspermeter) => new TorquePerLength(newtoncentimeterspermeter, TorquePerLengthUnit.NewtonCentimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromNewtonMetersPerMeter(double newtonmeterspermeter) => new TorquePerLength(newtonmeterspermeter, TorquePerLengthUnit.NewtonMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromNewtonMillimetersPerMeter(double newtonmillimeterspermeter) => new TorquePerLength(newtonmillimeterspermeter, TorquePerLengthUnit.NewtonMillimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromPoundForceFeetPerFoot(double poundforcefeetperfoot) => new TorquePerLength(poundforcefeetperfoot, TorquePerLengthUnit.PoundForceFootPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromPoundForceInchesPerFoot(double poundforceinchesperfoot) => new TorquePerLength(poundforceinchesperfoot, TorquePerLengthUnit.PoundForceInchPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromTonneForceCentimetersPerMeter(double tonneforcecentimeterspermeter) => new TorquePerLength(tonneforcecentimeterspermeter, TorquePerLengthUnit.TonneForceCentimeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromTonneForceMetersPerMeter(double tonneforcemeterspermeter) => new TorquePerLength(tonneforcemeterspermeter, TorquePerLengthUnit.TonneForceMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static TorquePerLength FromTonneForceMillimetersPerMeter(double tonneforcemillimeterspermeter) => new TorquePerLength(tonneforcemillimeterspermeter, TorquePerLengthUnit.TonneForceMillimeterPerMeter);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Turbidity.g.cs
index e3e71a49b2..2236c68ab7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Turbidity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Turbidity.g.cs
@@ -54,7 +54,6 @@ public struct Turbidity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Turbidity(double value, TurbidityUnit unit)
{
_value = value;
@@ -94,7 +93,6 @@ public Turbidity(double value, TurbidityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Turbidity FromNTU(double ntu) => new Turbidity(ntu, TurbidityUnit.NTU);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VitaminA.g.cs
index 455480166a..2cb2636459 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VitaminA.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VitaminA.g.cs
@@ -51,7 +51,6 @@ public struct VitaminA
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VitaminA(double value, VitaminAUnit unit)
{
_value = value;
@@ -91,7 +90,6 @@ public VitaminA(double value, VitaminAUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VitaminA FromInternationalUnits(double internationalunits) => new VitaminA(internationalunits, VitaminAUnit.InternationalUnit);
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs
index ab1ed14870..71a9f8ae2b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/Volume.g.cs
@@ -51,7 +51,6 @@ public struct Volume
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public Volume(double value, VolumeUnit unit)
{
_value = value;
@@ -356,325 +355,271 @@ public Volume(double value, VolumeUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromAcreFeet(double acrefeet) => new Volume(acrefeet, VolumeUnit.AcreFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromAuTablespoons(double autablespoons) => new Volume(autablespoons, VolumeUnit.AuTablespoon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromBoardFeet(double boardfeet) => new Volume(boardfeet, VolumeUnit.BoardFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCentiliters(double centiliters) => new Volume(centiliters, VolumeUnit.Centiliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicCentimeters(double cubiccentimeters) => new Volume(cubiccentimeters, VolumeUnit.CubicCentimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicDecimeters(double cubicdecimeters) => new Volume(cubicdecimeters, VolumeUnit.CubicDecimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicFeet(double cubicfeet) => new Volume(cubicfeet, VolumeUnit.CubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicHectometers(double cubichectometers) => new Volume(cubichectometers, VolumeUnit.CubicHectometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicInches(double cubicinches) => new Volume(cubicinches, VolumeUnit.CubicInch);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicKilometers(double cubickilometers) => new Volume(cubickilometers, VolumeUnit.CubicKilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicMeters(double cubicmeters) => new Volume(cubicmeters, VolumeUnit.CubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicMicrometers(double cubicmicrometers) => new Volume(cubicmicrometers, VolumeUnit.CubicMicrometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicMiles(double cubicmiles) => new Volume(cubicmiles, VolumeUnit.CubicMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicMillimeters(double cubicmillimeters) => new Volume(cubicmillimeters, VolumeUnit.CubicMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromCubicYards(double cubicyards) => new Volume(cubicyards, VolumeUnit.CubicYard);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromDecaliters(double decaliters) => new Volume(decaliters, VolumeUnit.Decaliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromDecausGallons(double decausgallons) => new Volume(decausgallons, VolumeUnit.DecausGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromDeciliters(double deciliters) => new Volume(deciliters, VolumeUnit.Deciliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromDeciusGallons(double deciusgallons) => new Volume(deciusgallons, VolumeUnit.DeciusGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromHectocubicFeet(double hectocubicfeet) => new Volume(hectocubicfeet, VolumeUnit.HectocubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromHectocubicMeters(double hectocubicmeters) => new Volume(hectocubicmeters, VolumeUnit.HectocubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromHectoliters(double hectoliters) => new Volume(hectoliters, VolumeUnit.Hectoliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromHectousGallons(double hectousgallons) => new Volume(hectousgallons, VolumeUnit.HectousGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromImperialBeerBarrels(double imperialbeerbarrels) => new Volume(imperialbeerbarrels, VolumeUnit.ImperialBeerBarrel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromImperialGallons(double imperialgallons) => new Volume(imperialgallons, VolumeUnit.ImperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromImperialOunces(double imperialounces) => new Volume(imperialounces, VolumeUnit.ImperialOunce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromImperialPints(double imperialpints) => new Volume(imperialpints, VolumeUnit.ImperialPint);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromImperialQuarts(double imperialquarts) => new Volume(imperialquarts, VolumeUnit.ImperialQuart);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromKilocubicFeet(double kilocubicfeet) => new Volume(kilocubicfeet, VolumeUnit.KilocubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromKilocubicMeters(double kilocubicmeters) => new Volume(kilocubicmeters, VolumeUnit.KilocubicMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromKiloimperialGallons(double kiloimperialgallons) => new Volume(kiloimperialgallons, VolumeUnit.KiloimperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromKiloliters(double kiloliters) => new Volume(kiloliters, VolumeUnit.Kiloliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromKilousGallons(double kilousgallons) => new Volume(kilousgallons, VolumeUnit.KilousGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromLiters(double liters) => new Volume(liters, VolumeUnit.Liter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMegacubicFeet(double megacubicfeet) => new Volume(megacubicfeet, VolumeUnit.MegacubicFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMegaimperialGallons(double megaimperialgallons) => new Volume(megaimperialgallons, VolumeUnit.MegaimperialGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMegaliters(double megaliters) => new Volume(megaliters, VolumeUnit.Megaliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMegausGallons(double megausgallons) => new Volume(megausgallons, VolumeUnit.MegausGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMetricCups(double metriccups) => new Volume(metriccups, VolumeUnit.MetricCup);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMetricTeaspoons(double metricteaspoons) => new Volume(metricteaspoons, VolumeUnit.MetricTeaspoon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMicroliters(double microliters) => new Volume(microliters, VolumeUnit.Microliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromMilliliters(double milliliters) => new Volume(milliliters, VolumeUnit.Milliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromNanoliters(double nanoliters) => new Volume(nanoliters, VolumeUnit.Nanoliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromOilBarrels(double oilbarrels) => new Volume(oilbarrels, VolumeUnit.OilBarrel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUkTablespoons(double uktablespoons) => new Volume(uktablespoons, VolumeUnit.UkTablespoon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsBeerBarrels(double usbeerbarrels) => new Volume(usbeerbarrels, VolumeUnit.UsBeerBarrel);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsCustomaryCups(double uscustomarycups) => new Volume(uscustomarycups, VolumeUnit.UsCustomaryCup);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsGallons(double usgallons) => new Volume(usgallons, VolumeUnit.UsGallon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsLegalCups(double uslegalcups) => new Volume(uslegalcups, VolumeUnit.UsLegalCup);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsOunces(double usounces) => new Volume(usounces, VolumeUnit.UsOunce);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsPints(double uspints) => new Volume(uspints, VolumeUnit.UsPint);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsQuarts(double usquarts) => new Volume(usquarts, VolumeUnit.UsQuart);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsTablespoons(double ustablespoons) => new Volume(ustablespoons, VolumeUnit.UsTablespoon);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static Volume FromUsTeaspoons(double usteaspoons) => new Volume(usteaspoons, VolumeUnit.UsTeaspoon);
///
@@ -717,41 +662,41 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- VolumeUnit.AcreFoot => _value / 0.000810714,
+ VolumeUnit.AcreFoot => _value * 1233.48183754752,
VolumeUnit.AuTablespoon => _value * 2e-5,
- VolumeUnit.BoardFoot => _value * 2.3597372158e-3,
+ VolumeUnit.BoardFoot => _value * (0.028316846592 / 12),
VolumeUnit.Centiliter => (_value / 1e3) * 1e-2d,
VolumeUnit.CubicCentimeter => _value / 1e6,
VolumeUnit.CubicDecimeter => _value / 1e3,
- VolumeUnit.CubicFoot => _value * 2.8316846592e-2,
+ VolumeUnit.CubicFoot => _value * 0.028316846592,
VolumeUnit.CubicHectometer => _value * 1e6,
VolumeUnit.CubicInch => _value * 1.6387064e-5,
VolumeUnit.CubicKilometer => _value * 1e9,
VolumeUnit.CubicMeter => _value,
VolumeUnit.CubicMicrometer => _value / 1e18,
- VolumeUnit.CubicMile => _value * 4.16818182544058e9,
+ VolumeUnit.CubicMile => _value * 4.168181825440579584e9,
VolumeUnit.CubicMillimeter => _value / 1e9,
- VolumeUnit.CubicYard => _value * 0.764554858,
+ VolumeUnit.CubicYard => _value * 0.764554857984,
VolumeUnit.Decaliter => (_value / 1e3) * 1e1d,
VolumeUnit.DecausGallon => (_value * 0.003785411784) * 1e1d,
VolumeUnit.Deciliter => (_value / 1e3) * 1e-1d,
VolumeUnit.DeciusGallon => (_value * 0.003785411784) * 1e-1d,
- VolumeUnit.HectocubicFoot => (_value * 2.8316846592e-2) * 1e2d,
+ VolumeUnit.HectocubicFoot => (_value * 0.028316846592) * 1e2d,
VolumeUnit.HectocubicMeter => (_value) * 1e2d,
VolumeUnit.Hectoliter => (_value / 1e3) * 1e2d,
VolumeUnit.HectousGallon => (_value * 0.003785411784) * 1e2d,
VolumeUnit.ImperialBeerBarrel => _value * 0.16365924,
VolumeUnit.ImperialGallon => _value * 0.00454609,
- VolumeUnit.ImperialOunce => _value * 2.8413062499962901241875439064617e-5,
+ VolumeUnit.ImperialOunce => _value * 2.84130625e-5,
VolumeUnit.ImperialPint => _value * 5.6826125e-4,
VolumeUnit.ImperialQuart => _value * 1.1365225e-3,
- VolumeUnit.KilocubicFoot => (_value * 2.8316846592e-2) * 1e3d,
+ VolumeUnit.KilocubicFoot => (_value * 0.028316846592) * 1e3d,
VolumeUnit.KilocubicMeter => (_value) * 1e3d,
VolumeUnit.KiloimperialGallon => (_value * 0.00454609) * 1e3d,
VolumeUnit.Kiloliter => (_value / 1e3) * 1e3d,
VolumeUnit.KilousGallon => (_value * 0.003785411784) * 1e3d,
VolumeUnit.Liter => _value / 1e3,
- VolumeUnit.MegacubicFoot => (_value * 2.8316846592e-2) * 1e6d,
+ VolumeUnit.MegacubicFoot => (_value * 0.028316846592) * 1e6d,
VolumeUnit.MegaimperialGallon => (_value * 0.00454609) * 1e6d,
VolumeUnit.Megaliter => (_value / 1e3) * 1e6d,
VolumeUnit.MegausGallon => (_value * 0.003785411784) * 1e6d,
@@ -762,11 +707,11 @@ private double GetValueInBaseUnit()
VolumeUnit.Nanoliter => (_value / 1e3) * 1e-9d,
VolumeUnit.OilBarrel => _value * 0.158987294928,
VolumeUnit.UkTablespoon => _value * 1.5e-5,
- VolumeUnit.UsBeerBarrel => _value * 0.1173477658,
+ VolumeUnit.UsBeerBarrel => _value * 0.117347765304,
VolumeUnit.UsCustomaryCup => _value * 0.0002365882365,
VolumeUnit.UsGallon => _value * 0.003785411784,
VolumeUnit.UsLegalCup => _value * 0.00024,
- VolumeUnit.UsOunce => _value * 2.957352956253760505068307980135e-5,
+ VolumeUnit.UsOunce => _value * 2.95735295625e-5,
VolumeUnit.UsPint => _value * 4.73176473e-4,
VolumeUnit.UsQuart => _value * 9.46352946e-4,
VolumeUnit.UsTablespoon => _value * 1.478676478125e-5,
@@ -784,41 +729,41 @@ private double GetValueAs(VolumeUnit unit)
return unit switch
{
- VolumeUnit.AcreFoot => baseUnitValue * 0.000810714,
+ VolumeUnit.AcreFoot => baseUnitValue / 1233.48183754752,
VolumeUnit.AuTablespoon => baseUnitValue / 2e-5,
- VolumeUnit.BoardFoot => baseUnitValue / 2.3597372158e-3,
+ VolumeUnit.BoardFoot => baseUnitValue / (0.028316846592 / 12),
VolumeUnit.Centiliter => (baseUnitValue * 1e3) / 1e-2d,
VolumeUnit.CubicCentimeter => baseUnitValue * 1e6,
VolumeUnit.CubicDecimeter => baseUnitValue * 1e3,
- VolumeUnit.CubicFoot => baseUnitValue / 2.8316846592e-2,
+ VolumeUnit.CubicFoot => baseUnitValue / 0.028316846592,
VolumeUnit.CubicHectometer => baseUnitValue / 1e6,
VolumeUnit.CubicInch => baseUnitValue / 1.6387064e-5,
VolumeUnit.CubicKilometer => baseUnitValue / 1e9,
VolumeUnit.CubicMeter => baseUnitValue,
VolumeUnit.CubicMicrometer => baseUnitValue * 1e18,
- VolumeUnit.CubicMile => baseUnitValue / 4.16818182544058e9,
+ VolumeUnit.CubicMile => baseUnitValue / 4.168181825440579584e9,
VolumeUnit.CubicMillimeter => baseUnitValue * 1e9,
- VolumeUnit.CubicYard => baseUnitValue / 0.764554858,
+ VolumeUnit.CubicYard => baseUnitValue / 0.764554857984,
VolumeUnit.Decaliter => (baseUnitValue * 1e3) / 1e1d,
VolumeUnit.DecausGallon => (baseUnitValue / 0.003785411784) / 1e1d,
VolumeUnit.Deciliter => (baseUnitValue * 1e3) / 1e-1d,
VolumeUnit.DeciusGallon => (baseUnitValue / 0.003785411784) / 1e-1d,
- VolumeUnit.HectocubicFoot => (baseUnitValue / 2.8316846592e-2) / 1e2d,
+ VolumeUnit.HectocubicFoot => (baseUnitValue / 0.028316846592) / 1e2d,
VolumeUnit.HectocubicMeter => (baseUnitValue) / 1e2d,
VolumeUnit.Hectoliter => (baseUnitValue * 1e3) / 1e2d,
VolumeUnit.HectousGallon => (baseUnitValue / 0.003785411784) / 1e2d,
VolumeUnit.ImperialBeerBarrel => baseUnitValue / 0.16365924,
VolumeUnit.ImperialGallon => baseUnitValue / 0.00454609,
- VolumeUnit.ImperialOunce => baseUnitValue / 2.8413062499962901241875439064617e-5,
+ VolumeUnit.ImperialOunce => baseUnitValue / 2.84130625e-5,
VolumeUnit.ImperialPint => baseUnitValue / 5.6826125e-4,
VolumeUnit.ImperialQuart => baseUnitValue / 1.1365225e-3,
- VolumeUnit.KilocubicFoot => (baseUnitValue / 2.8316846592e-2) / 1e3d,
+ VolumeUnit.KilocubicFoot => (baseUnitValue / 0.028316846592) / 1e3d,
VolumeUnit.KilocubicMeter => (baseUnitValue) / 1e3d,
VolumeUnit.KiloimperialGallon => (baseUnitValue / 0.00454609) / 1e3d,
VolumeUnit.Kiloliter => (baseUnitValue * 1e3) / 1e3d,
VolumeUnit.KilousGallon => (baseUnitValue / 0.003785411784) / 1e3d,
VolumeUnit.Liter => baseUnitValue * 1e3,
- VolumeUnit.MegacubicFoot => (baseUnitValue / 2.8316846592e-2) / 1e6d,
+ VolumeUnit.MegacubicFoot => (baseUnitValue / 0.028316846592) / 1e6d,
VolumeUnit.MegaimperialGallon => (baseUnitValue / 0.00454609) / 1e6d,
VolumeUnit.Megaliter => (baseUnitValue * 1e3) / 1e6d,
VolumeUnit.MegausGallon => (baseUnitValue / 0.003785411784) / 1e6d,
@@ -829,11 +774,11 @@ private double GetValueAs(VolumeUnit unit)
VolumeUnit.Nanoliter => (baseUnitValue * 1e3) / 1e-9d,
VolumeUnit.OilBarrel => baseUnitValue / 0.158987294928,
VolumeUnit.UkTablespoon => baseUnitValue / 1.5e-5,
- VolumeUnit.UsBeerBarrel => baseUnitValue / 0.1173477658,
+ VolumeUnit.UsBeerBarrel => baseUnitValue / 0.117347765304,
VolumeUnit.UsCustomaryCup => baseUnitValue / 0.0002365882365,
VolumeUnit.UsGallon => baseUnitValue / 0.003785411784,
VolumeUnit.UsLegalCup => baseUnitValue / 0.00024,
- VolumeUnit.UsOunce => baseUnitValue / 2.957352956253760505068307980135e-5,
+ VolumeUnit.UsOunce => baseUnitValue / 2.95735295625e-5,
VolumeUnit.UsPint => baseUnitValue / 4.73176473e-4,
VolumeUnit.UsQuart => baseUnitValue / 9.46352946e-4,
VolumeUnit.UsTablespoon => baseUnitValue / 1.478676478125e-5,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeConcentration.g.cs
index 1f679c5192..c9549407cc 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeConcentration.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeConcentration.g.cs
@@ -54,7 +54,6 @@ public struct VolumeConcentration
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VolumeConcentration(double value, VolumeConcentrationUnit unit)
{
_value = value;
@@ -83,24 +82,24 @@ public VolumeConcentration(double value, VolumeConcentrationUnit unit)
#region Conversion Properties
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double CentilitersPerLiter => As(VolumeConcentrationUnit.CentilitersPerLiter);
+ public double CentilitersPerLiter => As(VolumeConcentrationUnit.CentiliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double CentilitersPerMililiter => As(VolumeConcentrationUnit.CentilitersPerMililiter);
+ public double CentilitersPerMilliliter => As(VolumeConcentrationUnit.CentiliterPerMilliliter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double DecilitersPerLiter => As(VolumeConcentrationUnit.DecilitersPerLiter);
+ public double DecilitersPerLiter => As(VolumeConcentrationUnit.DeciliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double DecilitersPerMililiter => As(VolumeConcentrationUnit.DecilitersPerMililiter);
+ public double DecilitersPerMilliliter => As(VolumeConcentrationUnit.DeciliterPerMilliliter);
///
/// Gets a value of this quantity converted into
@@ -108,44 +107,44 @@ public VolumeConcentration(double value, VolumeConcentrationUnit unit)
public double DecimalFractions => As(VolumeConcentrationUnit.DecimalFraction);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double LitersPerLiter => As(VolumeConcentrationUnit.LitersPerLiter);
+ public double LitersPerLiter => As(VolumeConcentrationUnit.LiterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double LitersPerMililiter => As(VolumeConcentrationUnit.LitersPerMililiter);
+ public double LitersPerMilliliter => As(VolumeConcentrationUnit.LiterPerMilliliter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double MicrolitersPerLiter => As(VolumeConcentrationUnit.MicrolitersPerLiter);
+ public double MicrolitersPerLiter => As(VolumeConcentrationUnit.MicroliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double MicrolitersPerMililiter => As(VolumeConcentrationUnit.MicrolitersPerMililiter);
+ public double MicrolitersPerMilliliter => As(VolumeConcentrationUnit.MicroliterPerMilliliter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double MillilitersPerLiter => As(VolumeConcentrationUnit.MillilitersPerLiter);
+ public double MillilitersPerLiter => As(VolumeConcentrationUnit.MilliliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double MillilitersPerMililiter => As(VolumeConcentrationUnit.MillilitersPerMililiter);
+ public double MillilitersPerMilliliter => As(VolumeConcentrationUnit.MilliliterPerMilliliter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double NanolitersPerLiter => As(VolumeConcentrationUnit.NanolitersPerLiter);
+ public double NanolitersPerLiter => As(VolumeConcentrationUnit.NanoliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double NanolitersPerMililiter => As(VolumeConcentrationUnit.NanolitersPerMililiter);
+ public double NanolitersPerMilliliter => As(VolumeConcentrationUnit.NanoliterPerMilliliter);
///
/// Gets a value of this quantity converted into
@@ -173,138 +172,118 @@ public VolumeConcentration(double value, VolumeConcentrationUnit unit)
public double Percent => As(VolumeConcentrationUnit.Percent);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double PicolitersPerLiter => As(VolumeConcentrationUnit.PicolitersPerLiter);
+ public double PicolitersPerLiter => As(VolumeConcentrationUnit.PicoliterPerLiter);
///
- /// Gets a value of this quantity converted into
+ /// Gets a value of this quantity converted into
///
- public double PicolitersPerMililiter => As(VolumeConcentrationUnit.PicolitersPerMililiter);
+ public double PicolitersPerMilliliter => As(VolumeConcentrationUnit.PicoliterPerMilliliter);
#endregion
#region Static Factory Methods
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromCentilitersPerLiter(double centilitersperliter) => new VolumeConcentration(centilitersperliter, VolumeConcentrationUnit.CentilitersPerLiter);
+ public static VolumeConcentration FromCentilitersPerLiter(double centilitersperliter) => new VolumeConcentration(centilitersperliter, VolumeConcentrationUnit.CentiliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromCentilitersPerMililiter(double centiliterspermililiter) => new VolumeConcentration(centiliterspermililiter, VolumeConcentrationUnit.CentilitersPerMililiter);
+ public static VolumeConcentration FromCentilitersPerMilliliter(double centiliterspermilliliter) => new VolumeConcentration(centiliterspermilliliter, VolumeConcentrationUnit.CentiliterPerMilliliter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromDecilitersPerLiter(double decilitersperliter) => new VolumeConcentration(decilitersperliter, VolumeConcentrationUnit.DecilitersPerLiter);
+ public static VolumeConcentration FromDecilitersPerLiter(double decilitersperliter) => new VolumeConcentration(decilitersperliter, VolumeConcentrationUnit.DeciliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromDecilitersPerMililiter(double deciliterspermililiter) => new VolumeConcentration(deciliterspermililiter, VolumeConcentrationUnit.DecilitersPerMililiter);
+ public static VolumeConcentration FromDecilitersPerMilliliter(double deciliterspermilliliter) => new VolumeConcentration(deciliterspermilliliter, VolumeConcentrationUnit.DeciliterPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromDecimalFractions(double decimalfractions) => new VolumeConcentration(decimalfractions, VolumeConcentrationUnit.DecimalFraction);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromLitersPerLiter(double litersperliter) => new VolumeConcentration(litersperliter, VolumeConcentrationUnit.LitersPerLiter);
+ public static VolumeConcentration FromLitersPerLiter(double litersperliter) => new VolumeConcentration(litersperliter, VolumeConcentrationUnit.LiterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromLitersPerMililiter(double literspermililiter) => new VolumeConcentration(literspermililiter, VolumeConcentrationUnit.LitersPerMililiter);
+ public static VolumeConcentration FromLitersPerMilliliter(double literspermilliliter) => new VolumeConcentration(literspermilliliter, VolumeConcentrationUnit.LiterPerMilliliter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromMicrolitersPerLiter(double microlitersperliter) => new VolumeConcentration(microlitersperliter, VolumeConcentrationUnit.MicrolitersPerLiter);
+ public static VolumeConcentration FromMicrolitersPerLiter(double microlitersperliter) => new VolumeConcentration(microlitersperliter, VolumeConcentrationUnit.MicroliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromMicrolitersPerMililiter(double microliterspermililiter) => new VolumeConcentration(microliterspermililiter, VolumeConcentrationUnit.MicrolitersPerMililiter);
+ public static VolumeConcentration FromMicrolitersPerMilliliter(double microliterspermilliliter) => new VolumeConcentration(microliterspermilliliter, VolumeConcentrationUnit.MicroliterPerMilliliter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromMillilitersPerLiter(double millilitersperliter) => new VolumeConcentration(millilitersperliter, VolumeConcentrationUnit.MillilitersPerLiter);
+ public static VolumeConcentration FromMillilitersPerLiter(double millilitersperliter) => new VolumeConcentration(millilitersperliter, VolumeConcentrationUnit.MilliliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromMillilitersPerMililiter(double milliliterspermililiter) => new VolumeConcentration(milliliterspermililiter, VolumeConcentrationUnit.MillilitersPerMililiter);
+ public static VolumeConcentration FromMillilitersPerMilliliter(double milliliterspermilliliter) => new VolumeConcentration(milliliterspermilliliter, VolumeConcentrationUnit.MilliliterPerMilliliter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromNanolitersPerLiter(double nanolitersperliter) => new VolumeConcentration(nanolitersperliter, VolumeConcentrationUnit.NanolitersPerLiter);
+ public static VolumeConcentration FromNanolitersPerLiter(double nanolitersperliter) => new VolumeConcentration(nanolitersperliter, VolumeConcentrationUnit.NanoliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromNanolitersPerMililiter(double nanoliterspermililiter) => new VolumeConcentration(nanoliterspermililiter, VolumeConcentrationUnit.NanolitersPerMililiter);
+ public static VolumeConcentration FromNanolitersPerMilliliter(double nanoliterspermilliliter) => new VolumeConcentration(nanoliterspermilliliter, VolumeConcentrationUnit.NanoliterPerMilliliter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromPartsPerBillion(double partsperbillion) => new VolumeConcentration(partsperbillion, VolumeConcentrationUnit.PartPerBillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromPartsPerMillion(double partspermillion) => new VolumeConcentration(partspermillion, VolumeConcentrationUnit.PartPerMillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromPartsPerThousand(double partsperthousand) => new VolumeConcentration(partsperthousand, VolumeConcentrationUnit.PartPerThousand);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromPartsPerTrillion(double partspertrillion) => new VolumeConcentration(partspertrillion, VolumeConcentrationUnit.PartPerTrillion);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeConcentration FromPercent(double percent) => new VolumeConcentration(percent, VolumeConcentrationUnit.Percent);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromPicolitersPerLiter(double picolitersperliter) => new VolumeConcentration(picolitersperliter, VolumeConcentrationUnit.PicolitersPerLiter);
+ public static VolumeConcentration FromPicolitersPerLiter(double picolitersperliter) => new VolumeConcentration(picolitersperliter, VolumeConcentrationUnit.PicoliterPerLiter);
///
- /// Creates a from .
+ /// Creates a from .
///
- /// If value is NaN or Infinity.
- public static VolumeConcentration FromPicolitersPerMililiter(double picoliterspermililiter) => new VolumeConcentration(picoliterspermililiter, VolumeConcentrationUnit.PicolitersPerMililiter);
+ public static VolumeConcentration FromPicolitersPerMilliliter(double picoliterspermilliliter) => new VolumeConcentration(picoliterspermilliliter, VolumeConcentrationUnit.PicoliterPerMilliliter);
///
/// Dynamically convert from value and unit enum to .
@@ -346,26 +325,26 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- VolumeConcentrationUnit.CentilitersPerLiter => (_value) * 1e-2d,
- VolumeConcentrationUnit.CentilitersPerMililiter => (_value / 1e-3) * 1e-2d,
- VolumeConcentrationUnit.DecilitersPerLiter => (_value) * 1e-1d,
- VolumeConcentrationUnit.DecilitersPerMililiter => (_value / 1e-3) * 1e-1d,
+ VolumeConcentrationUnit.CentiliterPerLiter => (_value) * 1e-2d,
+ VolumeConcentrationUnit.CentiliterPerMilliliter => (_value / 1e-3) * 1e-2d,
+ VolumeConcentrationUnit.DeciliterPerLiter => (_value) * 1e-1d,
+ VolumeConcentrationUnit.DeciliterPerMilliliter => (_value / 1e-3) * 1e-1d,
VolumeConcentrationUnit.DecimalFraction => _value,
- VolumeConcentrationUnit.LitersPerLiter => _value,
- VolumeConcentrationUnit.LitersPerMililiter => _value / 1e-3,
- VolumeConcentrationUnit.MicrolitersPerLiter => (_value) * 1e-6d,
- VolumeConcentrationUnit.MicrolitersPerMililiter => (_value / 1e-3) * 1e-6d,
- VolumeConcentrationUnit.MillilitersPerLiter => (_value) * 1e-3d,
- VolumeConcentrationUnit.MillilitersPerMililiter => (_value / 1e-3) * 1e-3d,
- VolumeConcentrationUnit.NanolitersPerLiter => (_value) * 1e-9d,
- VolumeConcentrationUnit.NanolitersPerMililiter => (_value / 1e-3) * 1e-9d,
+ VolumeConcentrationUnit.LiterPerLiter => _value,
+ VolumeConcentrationUnit.LiterPerMilliliter => _value / 1e-3,
+ VolumeConcentrationUnit.MicroliterPerLiter => (_value) * 1e-6d,
+ VolumeConcentrationUnit.MicroliterPerMilliliter => (_value / 1e-3) * 1e-6d,
+ VolumeConcentrationUnit.MilliliterPerLiter => (_value) * 1e-3d,
+ VolumeConcentrationUnit.MilliliterPerMilliliter => (_value / 1e-3) * 1e-3d,
+ VolumeConcentrationUnit.NanoliterPerLiter => (_value) * 1e-9d,
+ VolumeConcentrationUnit.NanoliterPerMilliliter => (_value / 1e-3) * 1e-9d,
VolumeConcentrationUnit.PartPerBillion => _value / 1e9,
VolumeConcentrationUnit.PartPerMillion => _value / 1e6,
VolumeConcentrationUnit.PartPerThousand => _value / 1e3,
VolumeConcentrationUnit.PartPerTrillion => _value / 1e12,
VolumeConcentrationUnit.Percent => _value / 1e2,
- VolumeConcentrationUnit.PicolitersPerLiter => (_value) * 1e-12d,
- VolumeConcentrationUnit.PicolitersPerMililiter => (_value / 1e-3) * 1e-12d,
+ VolumeConcentrationUnit.PicoliterPerLiter => (_value) * 1e-12d,
+ VolumeConcentrationUnit.PicoliterPerMilliliter => (_value / 1e-3) * 1e-12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -379,26 +358,26 @@ private double GetValueAs(VolumeConcentrationUnit unit)
return unit switch
{
- VolumeConcentrationUnit.CentilitersPerLiter => (baseUnitValue) / 1e-2d,
- VolumeConcentrationUnit.CentilitersPerMililiter => (baseUnitValue * 1e-3) / 1e-2d,
- VolumeConcentrationUnit.DecilitersPerLiter => (baseUnitValue) / 1e-1d,
- VolumeConcentrationUnit.DecilitersPerMililiter => (baseUnitValue * 1e-3) / 1e-1d,
+ VolumeConcentrationUnit.CentiliterPerLiter => (baseUnitValue) / 1e-2d,
+ VolumeConcentrationUnit.CentiliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-2d,
+ VolumeConcentrationUnit.DeciliterPerLiter => (baseUnitValue) / 1e-1d,
+ VolumeConcentrationUnit.DeciliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-1d,
VolumeConcentrationUnit.DecimalFraction => baseUnitValue,
- VolumeConcentrationUnit.LitersPerLiter => baseUnitValue,
- VolumeConcentrationUnit.LitersPerMililiter => baseUnitValue * 1e-3,
- VolumeConcentrationUnit.MicrolitersPerLiter => (baseUnitValue) / 1e-6d,
- VolumeConcentrationUnit.MicrolitersPerMililiter => (baseUnitValue * 1e-3) / 1e-6d,
- VolumeConcentrationUnit.MillilitersPerLiter => (baseUnitValue) / 1e-3d,
- VolumeConcentrationUnit.MillilitersPerMililiter => (baseUnitValue * 1e-3) / 1e-3d,
- VolumeConcentrationUnit.NanolitersPerLiter => (baseUnitValue) / 1e-9d,
- VolumeConcentrationUnit.NanolitersPerMililiter => (baseUnitValue * 1e-3) / 1e-9d,
+ VolumeConcentrationUnit.LiterPerLiter => baseUnitValue,
+ VolumeConcentrationUnit.LiterPerMilliliter => baseUnitValue * 1e-3,
+ VolumeConcentrationUnit.MicroliterPerLiter => (baseUnitValue) / 1e-6d,
+ VolumeConcentrationUnit.MicroliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-6d,
+ VolumeConcentrationUnit.MilliliterPerLiter => (baseUnitValue) / 1e-3d,
+ VolumeConcentrationUnit.MilliliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-3d,
+ VolumeConcentrationUnit.NanoliterPerLiter => (baseUnitValue) / 1e-9d,
+ VolumeConcentrationUnit.NanoliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-9d,
VolumeConcentrationUnit.PartPerBillion => baseUnitValue * 1e9,
VolumeConcentrationUnit.PartPerMillion => baseUnitValue * 1e6,
VolumeConcentrationUnit.PartPerThousand => baseUnitValue * 1e3,
VolumeConcentrationUnit.PartPerTrillion => baseUnitValue * 1e12,
VolumeConcentrationUnit.Percent => baseUnitValue * 1e2,
- VolumeConcentrationUnit.PicolitersPerLiter => (baseUnitValue) / 1e-12d,
- VolumeConcentrationUnit.PicolitersPerMililiter => (baseUnitValue * 1e-3) / 1e-12d,
+ VolumeConcentrationUnit.PicoliterPerLiter => (baseUnitValue) / 1e-12d,
+ VolumeConcentrationUnit.PicoliterPerMilliliter => (baseUnitValue * 1e-3) / 1e-12d,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs
index 4e23c92fb5..0353917ddb 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlow.g.cs
@@ -51,7 +51,6 @@ public struct VolumeFlow
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VolumeFlow(double value, VolumeFlowUnit unit)
{
_value = value;
@@ -461,451 +460,376 @@ public VolumeFlow(double value, VolumeFlowUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromAcreFeetPerDay(double acrefeetperday) => new VolumeFlow(acrefeetperday, VolumeFlowUnit.AcreFootPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromAcreFeetPerHour(double acrefeetperhour) => new VolumeFlow(acrefeetperhour, VolumeFlowUnit.AcreFootPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromAcreFeetPerMinute(double acrefeetperminute) => new VolumeFlow(acrefeetperminute, VolumeFlowUnit.AcreFootPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromAcreFeetPerSecond(double acrefeetpersecond) => new VolumeFlow(acrefeetpersecond, VolumeFlowUnit.AcreFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCentilitersPerDay(double centilitersperday) => new VolumeFlow(centilitersperday, VolumeFlowUnit.CentiliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCentilitersPerHour(double centilitersperhour) => new VolumeFlow(centilitersperhour, VolumeFlowUnit.CentiliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCentilitersPerMinute(double centilitersperminute) => new VolumeFlow(centilitersperminute, VolumeFlowUnit.CentiliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCentilitersPerSecond(double centiliterspersecond) => new VolumeFlow(centiliterspersecond, VolumeFlowUnit.CentiliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicCentimetersPerMinute(double cubiccentimetersperminute) => new VolumeFlow(cubiccentimetersperminute, VolumeFlowUnit.CubicCentimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicDecimetersPerMinute(double cubicdecimetersperminute) => new VolumeFlow(cubicdecimetersperminute, VolumeFlowUnit.CubicDecimeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicFeetPerHour(double cubicfeetperhour) => new VolumeFlow(cubicfeetperhour, VolumeFlowUnit.CubicFootPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicFeetPerMinute(double cubicfeetperminute) => new VolumeFlow(cubicfeetperminute, VolumeFlowUnit.CubicFootPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicFeetPerSecond(double cubicfeetpersecond) => new VolumeFlow(cubicfeetpersecond, VolumeFlowUnit.CubicFootPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicMetersPerDay(double cubicmetersperday) => new VolumeFlow(cubicmetersperday, VolumeFlowUnit.CubicMeterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicMetersPerHour(double cubicmetersperhour) => new VolumeFlow(cubicmetersperhour, VolumeFlowUnit.CubicMeterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicMetersPerMinute(double cubicmetersperminute) => new VolumeFlow(cubicmetersperminute, VolumeFlowUnit.CubicMeterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicMetersPerSecond(double cubicmeterspersecond) => new VolumeFlow(cubicmeterspersecond, VolumeFlowUnit.CubicMeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicMillimetersPerSecond(double cubicmillimeterspersecond) => new VolumeFlow(cubicmillimeterspersecond, VolumeFlowUnit.CubicMillimeterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicYardsPerDay(double cubicyardsperday) => new VolumeFlow(cubicyardsperday, VolumeFlowUnit.CubicYardPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicYardsPerHour(double cubicyardsperhour) => new VolumeFlow(cubicyardsperhour, VolumeFlowUnit.CubicYardPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicYardsPerMinute(double cubicyardsperminute) => new VolumeFlow(cubicyardsperminute, VolumeFlowUnit.CubicYardPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromCubicYardsPerSecond(double cubicyardspersecond) => new VolumeFlow(cubicyardspersecond, VolumeFlowUnit.CubicYardPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecalitersPerDay(double decalitersperday) => new VolumeFlow(decalitersperday, VolumeFlowUnit.DecaliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecalitersPerHour(double decalitersperhour) => new VolumeFlow(decalitersperhour, VolumeFlowUnit.DecaliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecalitersPerMinute(double decalitersperminute) => new VolumeFlow(decalitersperminute, VolumeFlowUnit.DecaliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecalitersPerSecond(double decaliterspersecond) => new VolumeFlow(decaliterspersecond, VolumeFlowUnit.DecaliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecilitersPerDay(double decilitersperday) => new VolumeFlow(decilitersperday, VolumeFlowUnit.DeciliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecilitersPerHour(double decilitersperhour) => new VolumeFlow(decilitersperhour, VolumeFlowUnit.DeciliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecilitersPerMinute(double decilitersperminute) => new VolumeFlow(decilitersperminute, VolumeFlowUnit.DeciliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromDecilitersPerSecond(double deciliterspersecond) => new VolumeFlow(deciliterspersecond, VolumeFlowUnit.DeciliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromHectolitersPerDay(double hectolitersperday) => new VolumeFlow(hectolitersperday, VolumeFlowUnit.HectoliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromHectolitersPerHour(double hectolitersperhour) => new VolumeFlow(hectolitersperhour, VolumeFlowUnit.HectoliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromHectolitersPerMinute(double hectolitersperminute) => new VolumeFlow(hectolitersperminute, VolumeFlowUnit.HectoliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromHectolitersPerSecond(double hectoliterspersecond) => new VolumeFlow(hectoliterspersecond, VolumeFlowUnit.HectoliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromKilolitersPerDay(double kilolitersperday) => new VolumeFlow(kilolitersperday, VolumeFlowUnit.KiloliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromKilolitersPerHour(double kilolitersperhour) => new VolumeFlow(kilolitersperhour, VolumeFlowUnit.KiloliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromKilolitersPerMinute(double kilolitersperminute) => new VolumeFlow(kilolitersperminute, VolumeFlowUnit.KiloliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromKilolitersPerSecond(double kiloliterspersecond) => new VolumeFlow(kiloliterspersecond, VolumeFlowUnit.KiloliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromKilousGallonsPerMinute(double kilousgallonsperminute) => new VolumeFlow(kilousgallonsperminute, VolumeFlowUnit.KilousGallonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromLitersPerDay(double litersperday) => new VolumeFlow(litersperday, VolumeFlowUnit.LiterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromLitersPerHour(double litersperhour) => new VolumeFlow(litersperhour, VolumeFlowUnit.LiterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromLitersPerMinute(double litersperminute) => new VolumeFlow(litersperminute, VolumeFlowUnit.LiterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromLitersPerSecond(double literspersecond) => new VolumeFlow(literspersecond, VolumeFlowUnit.LiterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegalitersPerDay(double megalitersperday) => new VolumeFlow(megalitersperday, VolumeFlowUnit.MegaliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegalitersPerHour(double megalitersperhour) => new VolumeFlow(megalitersperhour, VolumeFlowUnit.MegaliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegalitersPerMinute(double megalitersperminute) => new VolumeFlow(megalitersperminute, VolumeFlowUnit.MegaliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegalitersPerSecond(double megaliterspersecond) => new VolumeFlow(megaliterspersecond, VolumeFlowUnit.MegaliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegaukGallonsPerDay(double megaukgallonsperday) => new VolumeFlow(megaukgallonsperday, VolumeFlowUnit.MegaukGallonPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegaukGallonsPerSecond(double megaukgallonspersecond) => new VolumeFlow(megaukgallonspersecond, VolumeFlowUnit.MegaukGallonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMegausGallonsPerDay(double megausgallonsperday) => new VolumeFlow(megausgallonsperday, VolumeFlowUnit.MegausGallonPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMicrolitersPerDay(double microlitersperday) => new VolumeFlow(microlitersperday, VolumeFlowUnit.MicroliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMicrolitersPerHour(double microlitersperhour) => new VolumeFlow(microlitersperhour, VolumeFlowUnit.MicroliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMicrolitersPerMinute(double microlitersperminute) => new VolumeFlow(microlitersperminute, VolumeFlowUnit.MicroliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMicrolitersPerSecond(double microliterspersecond) => new VolumeFlow(microliterspersecond, VolumeFlowUnit.MicroliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMillilitersPerDay(double millilitersperday) => new VolumeFlow(millilitersperday, VolumeFlowUnit.MilliliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMillilitersPerHour(double millilitersperhour) => new VolumeFlow(millilitersperhour, VolumeFlowUnit.MilliliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMillilitersPerMinute(double millilitersperminute) => new VolumeFlow(millilitersperminute, VolumeFlowUnit.MilliliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMillilitersPerSecond(double milliliterspersecond) => new VolumeFlow(milliliterspersecond, VolumeFlowUnit.MilliliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromMillionUsGallonsPerDay(double millionusgallonsperday) => new VolumeFlow(millionusgallonsperday, VolumeFlowUnit.MillionUsGallonPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromNanolitersPerDay(double nanolitersperday) => new VolumeFlow(nanolitersperday, VolumeFlowUnit.NanoliterPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromNanolitersPerHour(double nanolitersperhour) => new VolumeFlow(nanolitersperhour, VolumeFlowUnit.NanoliterPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromNanolitersPerMinute(double nanolitersperminute) => new VolumeFlow(nanolitersperminute, VolumeFlowUnit.NanoliterPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromNanolitersPerSecond(double nanoliterspersecond) => new VolumeFlow(nanoliterspersecond, VolumeFlowUnit.NanoliterPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromOilBarrelsPerDay(double oilbarrelsperday) => new VolumeFlow(oilbarrelsperday, VolumeFlowUnit.OilBarrelPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromOilBarrelsPerHour(double oilbarrelsperhour) => new VolumeFlow(oilbarrelsperhour, VolumeFlowUnit.OilBarrelPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromOilBarrelsPerMinute(double oilbarrelsperminute) => new VolumeFlow(oilbarrelsperminute, VolumeFlowUnit.OilBarrelPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromOilBarrelsPerSecond(double oilbarrelspersecond) => new VolumeFlow(oilbarrelspersecond, VolumeFlowUnit.OilBarrelPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUkGallonsPerDay(double ukgallonsperday) => new VolumeFlow(ukgallonsperday, VolumeFlowUnit.UkGallonPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUkGallonsPerHour(double ukgallonsperhour) => new VolumeFlow(ukgallonsperhour, VolumeFlowUnit.UkGallonPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUkGallonsPerMinute(double ukgallonsperminute) => new VolumeFlow(ukgallonsperminute, VolumeFlowUnit.UkGallonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUkGallonsPerSecond(double ukgallonspersecond) => new VolumeFlow(ukgallonspersecond, VolumeFlowUnit.UkGallonPerSecond);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUsGallonsPerDay(double usgallonsperday) => new VolumeFlow(usgallonsperday, VolumeFlowUnit.UsGallonPerDay);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUsGallonsPerHour(double usgallonsperhour) => new VolumeFlow(usgallonsperhour, VolumeFlowUnit.UsGallonPerHour);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUsGallonsPerMinute(double usgallonsperminute) => new VolumeFlow(usgallonsperminute, VolumeFlowUnit.UsGallonPerMinute);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlow FromUsGallonsPerSecond(double usgallonspersecond) => new VolumeFlow(usgallonspersecond, VolumeFlowUnit.UsGallonPerSecond);
///
@@ -948,81 +872,81 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- VolumeFlowUnit.AcreFootPerDay => _value / 70.0457,
- VolumeFlowUnit.AcreFootPerHour => _value / 2.91857,
- VolumeFlowUnit.AcreFootPerMinute => _value / 0.0486427916,
- VolumeFlowUnit.AcreFootPerSecond => _value / 0.000810713194,
- VolumeFlowUnit.CentiliterPerDay => (_value / 86400000) * 1e-2d,
- VolumeFlowUnit.CentiliterPerHour => (_value / 3600000.000) * 1e-2d,
- VolumeFlowUnit.CentiliterPerMinute => (_value / 60000.00000) * 1e-2d,
+ VolumeFlowUnit.AcreFootPerDay => _value * 1233.48183754752 / 86400,
+ VolumeFlowUnit.AcreFootPerHour => _value * 1233.48183754752 / 3600,
+ VolumeFlowUnit.AcreFootPerMinute => _value * 1233.48183754752 / 60,
+ VolumeFlowUnit.AcreFootPerSecond => _value * 1233.48183754752,
+ VolumeFlowUnit.CentiliterPerDay => (_value / (1000 * 86400)) * 1e-2d,
+ VolumeFlowUnit.CentiliterPerHour => (_value / (1000 * 3600)) * 1e-2d,
+ VolumeFlowUnit.CentiliterPerMinute => (_value / (1000 * 60)) * 1e-2d,
VolumeFlowUnit.CentiliterPerSecond => (_value / 1000) * 1e-2d,
- VolumeFlowUnit.CubicCentimeterPerMinute => _value * 1.6666666666667e-8,
+ VolumeFlowUnit.CubicCentimeterPerMinute => _value * 1e-6 / 60,
VolumeFlowUnit.CubicDecimeterPerMinute => _value / 60000.00000,
- VolumeFlowUnit.CubicFootPerHour => _value * 7.8657907199999087346816086183876e-6,
- VolumeFlowUnit.CubicFootPerMinute => _value / 2118.88000326,
- VolumeFlowUnit.CubicFootPerSecond => _value / 35.314666721,
+ VolumeFlowUnit.CubicFootPerHour => _value * 0.028316846592 / 3600,
+ VolumeFlowUnit.CubicFootPerMinute => _value * 0.028316846592 / 60,
+ VolumeFlowUnit.CubicFootPerSecond => _value * 0.028316846592,
VolumeFlowUnit.CubicMeterPerDay => _value / 86400,
VolumeFlowUnit.CubicMeterPerHour => _value / 3600,
VolumeFlowUnit.CubicMeterPerMinute => _value / 60,
VolumeFlowUnit.CubicMeterPerSecond => _value,
VolumeFlowUnit.CubicMillimeterPerSecond => _value * 1e-9,
- VolumeFlowUnit.CubicYardPerDay => _value / 113007,
- VolumeFlowUnit.CubicYardPerHour => _value * 2.1237634944E-4,
- VolumeFlowUnit.CubicYardPerMinute => _value * 0.0127425809664,
+ VolumeFlowUnit.CubicYardPerDay => _value * 0.764554857984 / 86400,
+ VolumeFlowUnit.CubicYardPerHour => _value * 0.764554857984 / 3600,
+ VolumeFlowUnit.CubicYardPerMinute => _value * 0.764554857984 / 60,
VolumeFlowUnit.CubicYardPerSecond => _value * 0.764554857984,
- VolumeFlowUnit.DecaliterPerDay => (_value / 86400000) * 1e1d,
- VolumeFlowUnit.DecaliterPerHour => (_value / 3600000.000) * 1e1d,
- VolumeFlowUnit.DecaliterPerMinute => (_value / 60000.00000) * 1e1d,
+ VolumeFlowUnit.DecaliterPerDay => (_value / (1000 * 86400)) * 1e1d,
+ VolumeFlowUnit.DecaliterPerHour => (_value / (1000 * 3600)) * 1e1d,
+ VolumeFlowUnit.DecaliterPerMinute => (_value / (1000 * 60)) * 1e1d,
VolumeFlowUnit.DecaliterPerSecond => (_value / 1000) * 1e1d,
- VolumeFlowUnit.DeciliterPerDay => (_value / 86400000) * 1e-1d,
- VolumeFlowUnit.DeciliterPerHour => (_value / 3600000.000) * 1e-1d,
- VolumeFlowUnit.DeciliterPerMinute => (_value / 60000.00000) * 1e-1d,
+ VolumeFlowUnit.DeciliterPerDay => (_value / (1000 * 86400)) * 1e-1d,
+ VolumeFlowUnit.DeciliterPerHour => (_value / (1000 * 3600)) * 1e-1d,
+ VolumeFlowUnit.DeciliterPerMinute => (_value / (1000 * 60)) * 1e-1d,
VolumeFlowUnit.DeciliterPerSecond => (_value / 1000) * 1e-1d,
- VolumeFlowUnit.HectoliterPerDay => (_value / 86400000) * 1e2d,
- VolumeFlowUnit.HectoliterPerHour => (_value / 3600000.000) * 1e2d,
- VolumeFlowUnit.HectoliterPerMinute => (_value / 60000.00000) * 1e2d,
+ VolumeFlowUnit.HectoliterPerDay => (_value / (1000 * 86400)) * 1e2d,
+ VolumeFlowUnit.HectoliterPerHour => (_value / (1000 * 3600)) * 1e2d,
+ VolumeFlowUnit.HectoliterPerMinute => (_value / (1000 * 60)) * 1e2d,
VolumeFlowUnit.HectoliterPerSecond => (_value / 1000) * 1e2d,
- VolumeFlowUnit.KiloliterPerDay => (_value / 86400000) * 1e3d,
- VolumeFlowUnit.KiloliterPerHour => (_value / 3600000.000) * 1e3d,
- VolumeFlowUnit.KiloliterPerMinute => (_value / 60000.00000) * 1e3d,
+ VolumeFlowUnit.KiloliterPerDay => (_value / (1000 * 86400)) * 1e3d,
+ VolumeFlowUnit.KiloliterPerHour => (_value / (1000 * 3600)) * 1e3d,
+ VolumeFlowUnit.KiloliterPerMinute => (_value / (1000 * 60)) * 1e3d,
VolumeFlowUnit.KiloliterPerSecond => (_value / 1000) * 1e3d,
- VolumeFlowUnit.KilousGallonPerMinute => _value / 15.850323141489,
- VolumeFlowUnit.LiterPerDay => _value / 86400000,
- VolumeFlowUnit.LiterPerHour => _value / 3600000.000,
- VolumeFlowUnit.LiterPerMinute => _value / 60000.00000,
+ VolumeFlowUnit.KilousGallonPerMinute => _value * 1000 * 0.003785411784 / 60,
+ VolumeFlowUnit.LiterPerDay => _value / (1000 * 86400),
+ VolumeFlowUnit.LiterPerHour => _value / (1000 * 3600),
+ VolumeFlowUnit.LiterPerMinute => _value / (1000 * 60),
VolumeFlowUnit.LiterPerSecond => _value / 1000,
- VolumeFlowUnit.MegaliterPerDay => (_value / 86400000) * 1e6d,
- VolumeFlowUnit.MegaliterPerHour => (_value / 3600000.000) * 1e6d,
- VolumeFlowUnit.MegaliterPerMinute => (_value / 60000.00000) * 1e6d,
+ VolumeFlowUnit.MegaliterPerDay => (_value / (1000 * 86400)) * 1e6d,
+ VolumeFlowUnit.MegaliterPerHour => (_value / (1000 * 3600)) * 1e6d,
+ VolumeFlowUnit.MegaliterPerMinute => (_value / (1000 * 60)) * 1e6d,
VolumeFlowUnit.MegaliterPerSecond => (_value / 1000) * 1e6d,
- VolumeFlowUnit.MegaukGallonPerDay => (_value / 19005304) * 1e6d,
- VolumeFlowUnit.MegaukGallonPerSecond => (_value / 219.969) * 1e6d,
- VolumeFlowUnit.MegausGallonPerDay => (_value / 22824465.227) * 1e6d,
- VolumeFlowUnit.MicroliterPerDay => (_value / 86400000) * 1e-6d,
- VolumeFlowUnit.MicroliterPerHour => (_value / 3600000.000) * 1e-6d,
- VolumeFlowUnit.MicroliterPerMinute => (_value / 60000.00000) * 1e-6d,
+ VolumeFlowUnit.MegaukGallonPerDay => (_value * 0.00454609 / 86400) * 1e6d,
+ VolumeFlowUnit.MegaukGallonPerSecond => (_value * 0.00454609) * 1e6d,
+ VolumeFlowUnit.MegausGallonPerDay => (_value * 0.003785411784 / 86400) * 1e6d,
+ VolumeFlowUnit.MicroliterPerDay => (_value / (1000 * 86400)) * 1e-6d,
+ VolumeFlowUnit.MicroliterPerHour => (_value / (1000 * 3600)) * 1e-6d,
+ VolumeFlowUnit.MicroliterPerMinute => (_value / (1000 * 60)) * 1e-6d,
VolumeFlowUnit.MicroliterPerSecond => (_value / 1000) * 1e-6d,
- VolumeFlowUnit.MilliliterPerDay => (_value / 86400000) * 1e-3d,
- VolumeFlowUnit.MilliliterPerHour => (_value / 3600000.000) * 1e-3d,
- VolumeFlowUnit.MilliliterPerMinute => (_value / 60000.00000) * 1e-3d,
+ VolumeFlowUnit.MilliliterPerDay => (_value / (1000 * 86400)) * 1e-3d,
+ VolumeFlowUnit.MilliliterPerHour => (_value / (1000 * 3600)) * 1e-3d,
+ VolumeFlowUnit.MilliliterPerMinute => (_value / (1000 * 60)) * 1e-3d,
VolumeFlowUnit.MilliliterPerSecond => (_value / 1000) * 1e-3d,
- VolumeFlowUnit.MillionUsGallonPerDay => _value / 22.824465227,
- VolumeFlowUnit.NanoliterPerDay => (_value / 86400000) * 1e-9d,
- VolumeFlowUnit.NanoliterPerHour => (_value / 3600000.000) * 1e-9d,
- VolumeFlowUnit.NanoliterPerMinute => (_value / 60000.00000) * 1e-9d,
+ VolumeFlowUnit.MillionUsGallonPerDay => _value * 1e6 * 0.003785411784 / 86400,
+ VolumeFlowUnit.NanoliterPerDay => (_value / (1000 * 86400)) * 1e-9d,
+ VolumeFlowUnit.NanoliterPerHour => (_value / (1000 * 3600)) * 1e-9d,
+ VolumeFlowUnit.NanoliterPerMinute => (_value / (1000 * 60)) * 1e-9d,
VolumeFlowUnit.NanoliterPerSecond => (_value / 1000) * 1e-9d,
- VolumeFlowUnit.OilBarrelPerDay => _value * 1.8401307283333333333333333333333e-6,
- VolumeFlowUnit.OilBarrelPerHour => _value * 4.41631375e-5,
- VolumeFlowUnit.OilBarrelPerMinute => _value * 2.64978825e-3,
- VolumeFlowUnit.OilBarrelPerSecond => _value / 6.28981,
- VolumeFlowUnit.UkGallonPerDay => _value / 19005304,
- VolumeFlowUnit.UkGallonPerHour => _value / 791887.667,
- VolumeFlowUnit.UkGallonPerMinute => _value / 13198.2,
- VolumeFlowUnit.UkGallonPerSecond => _value / 219.969,
- VolumeFlowUnit.UsGallonPerDay => _value / 22824465.227,
- VolumeFlowUnit.UsGallonPerHour => _value / 951019.38848933424,
- VolumeFlowUnit.UsGallonPerMinute => _value / 15850.323141489,
- VolumeFlowUnit.UsGallonPerSecond => _value / 264.1720523581484,
+ VolumeFlowUnit.OilBarrelPerDay => _value * 0.158987294928 / 86400,
+ VolumeFlowUnit.OilBarrelPerHour => _value * 0.158987294928 / 3600,
+ VolumeFlowUnit.OilBarrelPerMinute => _value * 0.158987294928 / 60,
+ VolumeFlowUnit.OilBarrelPerSecond => _value * 0.158987294928,
+ VolumeFlowUnit.UkGallonPerDay => _value * 0.00454609 / 86400,
+ VolumeFlowUnit.UkGallonPerHour => _value * 0.00454609 / 3600,
+ VolumeFlowUnit.UkGallonPerMinute => _value * 0.00454609 / 60,
+ VolumeFlowUnit.UkGallonPerSecond => _value * 0.00454609,
+ VolumeFlowUnit.UsGallonPerDay => _value * 0.003785411784 / 86400,
+ VolumeFlowUnit.UsGallonPerHour => _value * 0.003785411784 / 3600,
+ VolumeFlowUnit.UsGallonPerMinute => _value * 0.003785411784 / 60,
+ VolumeFlowUnit.UsGallonPerSecond => _value * 0.003785411784,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -1036,81 +960,81 @@ private double GetValueAs(VolumeFlowUnit unit)
return unit switch
{
- VolumeFlowUnit.AcreFootPerDay => baseUnitValue * 70.0457,
- VolumeFlowUnit.AcreFootPerHour => baseUnitValue * 2.91857,
- VolumeFlowUnit.AcreFootPerMinute => baseUnitValue * 0.0486427916,
- VolumeFlowUnit.AcreFootPerSecond => baseUnitValue * 0.000810713194,
- VolumeFlowUnit.CentiliterPerDay => (baseUnitValue * 86400000) / 1e-2d,
- VolumeFlowUnit.CentiliterPerHour => (baseUnitValue * 3600000.000) / 1e-2d,
- VolumeFlowUnit.CentiliterPerMinute => (baseUnitValue * 60000.00000) / 1e-2d,
+ VolumeFlowUnit.AcreFootPerDay => baseUnitValue / (1233.48183754752 / 86400),
+ VolumeFlowUnit.AcreFootPerHour => baseUnitValue / (1233.48183754752 / 3600),
+ VolumeFlowUnit.AcreFootPerMinute => baseUnitValue / (1233.48183754752 / 60),
+ VolumeFlowUnit.AcreFootPerSecond => baseUnitValue / 1233.48183754752,
+ VolumeFlowUnit.CentiliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e-2d,
+ VolumeFlowUnit.CentiliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e-2d,
+ VolumeFlowUnit.CentiliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e-2d,
VolumeFlowUnit.CentiliterPerSecond => (baseUnitValue * 1000) / 1e-2d,
- VolumeFlowUnit.CubicCentimeterPerMinute => baseUnitValue / 1.6666666666667e-8,
+ VolumeFlowUnit.CubicCentimeterPerMinute => baseUnitValue / (1e-6 / 60),
VolumeFlowUnit.CubicDecimeterPerMinute => baseUnitValue * 60000.00000,
- VolumeFlowUnit.CubicFootPerHour => baseUnitValue / 7.8657907199999087346816086183876e-6,
- VolumeFlowUnit.CubicFootPerMinute => baseUnitValue * 2118.88000326,
- VolumeFlowUnit.CubicFootPerSecond => baseUnitValue * 35.314666721,
+ VolumeFlowUnit.CubicFootPerHour => baseUnitValue / (0.028316846592 / 3600),
+ VolumeFlowUnit.CubicFootPerMinute => baseUnitValue / (0.028316846592 / 60),
+ VolumeFlowUnit.CubicFootPerSecond => baseUnitValue / 0.028316846592,
VolumeFlowUnit.CubicMeterPerDay => baseUnitValue * 86400,
VolumeFlowUnit.CubicMeterPerHour => baseUnitValue * 3600,
VolumeFlowUnit.CubicMeterPerMinute => baseUnitValue * 60,
VolumeFlowUnit.CubicMeterPerSecond => baseUnitValue,
VolumeFlowUnit.CubicMillimeterPerSecond => baseUnitValue / 1e-9,
- VolumeFlowUnit.CubicYardPerDay => baseUnitValue * 113007,
- VolumeFlowUnit.CubicYardPerHour => baseUnitValue / 2.1237634944E-4,
- VolumeFlowUnit.CubicYardPerMinute => baseUnitValue / 0.0127425809664,
+ VolumeFlowUnit.CubicYardPerDay => baseUnitValue / (0.764554857984 / 86400),
+ VolumeFlowUnit.CubicYardPerHour => baseUnitValue / (0.764554857984 / 3600),
+ VolumeFlowUnit.CubicYardPerMinute => baseUnitValue / (0.764554857984 / 60),
VolumeFlowUnit.CubicYardPerSecond => baseUnitValue / 0.764554857984,
- VolumeFlowUnit.DecaliterPerDay => (baseUnitValue * 86400000) / 1e1d,
- VolumeFlowUnit.DecaliterPerHour => (baseUnitValue * 3600000.000) / 1e1d,
- VolumeFlowUnit.DecaliterPerMinute => (baseUnitValue * 60000.00000) / 1e1d,
+ VolumeFlowUnit.DecaliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e1d,
+ VolumeFlowUnit.DecaliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e1d,
+ VolumeFlowUnit.DecaliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e1d,
VolumeFlowUnit.DecaliterPerSecond => (baseUnitValue * 1000) / 1e1d,
- VolumeFlowUnit.DeciliterPerDay => (baseUnitValue * 86400000) / 1e-1d,
- VolumeFlowUnit.DeciliterPerHour => (baseUnitValue * 3600000.000) / 1e-1d,
- VolumeFlowUnit.DeciliterPerMinute => (baseUnitValue * 60000.00000) / 1e-1d,
+ VolumeFlowUnit.DeciliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e-1d,
+ VolumeFlowUnit.DeciliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e-1d,
+ VolumeFlowUnit.DeciliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e-1d,
VolumeFlowUnit.DeciliterPerSecond => (baseUnitValue * 1000) / 1e-1d,
- VolumeFlowUnit.HectoliterPerDay => (baseUnitValue * 86400000) / 1e2d,
- VolumeFlowUnit.HectoliterPerHour => (baseUnitValue * 3600000.000) / 1e2d,
- VolumeFlowUnit.HectoliterPerMinute => (baseUnitValue * 60000.00000) / 1e2d,
+ VolumeFlowUnit.HectoliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e2d,
+ VolumeFlowUnit.HectoliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e2d,
+ VolumeFlowUnit.HectoliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e2d,
VolumeFlowUnit.HectoliterPerSecond => (baseUnitValue * 1000) / 1e2d,
- VolumeFlowUnit.KiloliterPerDay => (baseUnitValue * 86400000) / 1e3d,
- VolumeFlowUnit.KiloliterPerHour => (baseUnitValue * 3600000.000) / 1e3d,
- VolumeFlowUnit.KiloliterPerMinute => (baseUnitValue * 60000.00000) / 1e3d,
+ VolumeFlowUnit.KiloliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e3d,
+ VolumeFlowUnit.KiloliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e3d,
+ VolumeFlowUnit.KiloliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e3d,
VolumeFlowUnit.KiloliterPerSecond => (baseUnitValue * 1000) / 1e3d,
- VolumeFlowUnit.KilousGallonPerMinute => baseUnitValue * 15.850323141489,
- VolumeFlowUnit.LiterPerDay => baseUnitValue * 86400000,
- VolumeFlowUnit.LiterPerHour => baseUnitValue * 3600000.000,
- VolumeFlowUnit.LiterPerMinute => baseUnitValue * 60000.00000,
+ VolumeFlowUnit.KilousGallonPerMinute => baseUnitValue / (1000 * 0.003785411784 / 60),
+ VolumeFlowUnit.LiterPerDay => baseUnitValue * (1000 * 86400),
+ VolumeFlowUnit.LiterPerHour => baseUnitValue * (1000 * 3600),
+ VolumeFlowUnit.LiterPerMinute => baseUnitValue * (1000 * 60),
VolumeFlowUnit.LiterPerSecond => baseUnitValue * 1000,
- VolumeFlowUnit.MegaliterPerDay => (baseUnitValue * 86400000) / 1e6d,
- VolumeFlowUnit.MegaliterPerHour => (baseUnitValue * 3600000.000) / 1e6d,
- VolumeFlowUnit.MegaliterPerMinute => (baseUnitValue * 60000.00000) / 1e6d,
+ VolumeFlowUnit.MegaliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e6d,
+ VolumeFlowUnit.MegaliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e6d,
+ VolumeFlowUnit.MegaliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e6d,
VolumeFlowUnit.MegaliterPerSecond => (baseUnitValue * 1000) / 1e6d,
- VolumeFlowUnit.MegaukGallonPerDay => (baseUnitValue * 19005304) / 1e6d,
- VolumeFlowUnit.MegaukGallonPerSecond => (baseUnitValue * 219.969) / 1e6d,
- VolumeFlowUnit.MegausGallonPerDay => (baseUnitValue * 22824465.227) / 1e6d,
- VolumeFlowUnit.MicroliterPerDay => (baseUnitValue * 86400000) / 1e-6d,
- VolumeFlowUnit.MicroliterPerHour => (baseUnitValue * 3600000.000) / 1e-6d,
- VolumeFlowUnit.MicroliterPerMinute => (baseUnitValue * 60000.00000) / 1e-6d,
+ VolumeFlowUnit.MegaukGallonPerDay => (baseUnitValue / (0.00454609 / 86400)) / 1e6d,
+ VolumeFlowUnit.MegaukGallonPerSecond => (baseUnitValue / 0.00454609) / 1e6d,
+ VolumeFlowUnit.MegausGallonPerDay => (baseUnitValue / (0.003785411784 / 86400)) / 1e6d,
+ VolumeFlowUnit.MicroliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e-6d,
+ VolumeFlowUnit.MicroliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e-6d,
+ VolumeFlowUnit.MicroliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e-6d,
VolumeFlowUnit.MicroliterPerSecond => (baseUnitValue * 1000) / 1e-6d,
- VolumeFlowUnit.MilliliterPerDay => (baseUnitValue * 86400000) / 1e-3d,
- VolumeFlowUnit.MilliliterPerHour => (baseUnitValue * 3600000.000) / 1e-3d,
- VolumeFlowUnit.MilliliterPerMinute => (baseUnitValue * 60000.00000) / 1e-3d,
+ VolumeFlowUnit.MilliliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e-3d,
+ VolumeFlowUnit.MilliliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e-3d,
+ VolumeFlowUnit.MilliliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e-3d,
VolumeFlowUnit.MilliliterPerSecond => (baseUnitValue * 1000) / 1e-3d,
- VolumeFlowUnit.MillionUsGallonPerDay => baseUnitValue * 22.824465227,
- VolumeFlowUnit.NanoliterPerDay => (baseUnitValue * 86400000) / 1e-9d,
- VolumeFlowUnit.NanoliterPerHour => (baseUnitValue * 3600000.000) / 1e-9d,
- VolumeFlowUnit.NanoliterPerMinute => (baseUnitValue * 60000.00000) / 1e-9d,
+ VolumeFlowUnit.MillionUsGallonPerDay => baseUnitValue / (1e6 * 0.003785411784 / 86400),
+ VolumeFlowUnit.NanoliterPerDay => (baseUnitValue * (1000 * 86400)) / 1e-9d,
+ VolumeFlowUnit.NanoliterPerHour => (baseUnitValue * (1000 * 3600)) / 1e-9d,
+ VolumeFlowUnit.NanoliterPerMinute => (baseUnitValue * (1000 * 60)) / 1e-9d,
VolumeFlowUnit.NanoliterPerSecond => (baseUnitValue * 1000) / 1e-9d,
- VolumeFlowUnit.OilBarrelPerDay => baseUnitValue / 1.8401307283333333333333333333333e-6,
- VolumeFlowUnit.OilBarrelPerHour => baseUnitValue / 4.41631375e-5,
- VolumeFlowUnit.OilBarrelPerMinute => baseUnitValue / 2.64978825e-3,
- VolumeFlowUnit.OilBarrelPerSecond => baseUnitValue * 6.28981,
- VolumeFlowUnit.UkGallonPerDay => baseUnitValue * 19005304,
- VolumeFlowUnit.UkGallonPerHour => baseUnitValue * 791887.667,
- VolumeFlowUnit.UkGallonPerMinute => baseUnitValue * 13198.2,
- VolumeFlowUnit.UkGallonPerSecond => baseUnitValue * 219.969,
- VolumeFlowUnit.UsGallonPerDay => baseUnitValue * 22824465.227,
- VolumeFlowUnit.UsGallonPerHour => baseUnitValue * 951019.38848933424,
- VolumeFlowUnit.UsGallonPerMinute => baseUnitValue * 15850.323141489,
- VolumeFlowUnit.UsGallonPerSecond => baseUnitValue * 264.1720523581484,
+ VolumeFlowUnit.OilBarrelPerDay => baseUnitValue / (0.158987294928 / 86400),
+ VolumeFlowUnit.OilBarrelPerHour => baseUnitValue / (0.158987294928 / 3600),
+ VolumeFlowUnit.OilBarrelPerMinute => baseUnitValue / (0.158987294928 / 60),
+ VolumeFlowUnit.OilBarrelPerSecond => baseUnitValue / 0.158987294928,
+ VolumeFlowUnit.UkGallonPerDay => baseUnitValue / (0.00454609 / 86400),
+ VolumeFlowUnit.UkGallonPerHour => baseUnitValue / (0.00454609 / 3600),
+ VolumeFlowUnit.UkGallonPerMinute => baseUnitValue / (0.00454609 / 60),
+ VolumeFlowUnit.UkGallonPerSecond => baseUnitValue / 0.00454609,
+ VolumeFlowUnit.UsGallonPerDay => baseUnitValue / (0.003785411784 / 86400),
+ VolumeFlowUnit.UsGallonPerHour => baseUnitValue / (0.003785411784 / 3600),
+ VolumeFlowUnit.UsGallonPerMinute => baseUnitValue / (0.003785411784 / 60),
+ VolumeFlowUnit.UsGallonPerSecond => baseUnitValue / 0.003785411784,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
index ff377e8767..3d4fd77881 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs
@@ -51,7 +51,6 @@ public struct VolumeFlowPerArea
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VolumeFlowPerArea(double value, VolumeFlowPerAreaUnit unit)
{
_value = value;
@@ -96,13 +95,11 @@ public VolumeFlowPerArea(double value, VolumeFlowPerAreaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlowPerArea FromCubicFeetPerMinutePerSquareFoot(double cubicfeetperminutepersquarefoot) => new VolumeFlowPerArea(cubicfeetperminutepersquarefoot, VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumeFlowPerArea FromCubicMetersPerSecondPerSquareMeter(double cubicmeterspersecondpersquaremeter) => new VolumeFlowPerArea(cubicmeterspersecondpersquaremeter, VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter);
///
@@ -145,7 +142,7 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot => _value / 196.850394,
+ VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot => _value * (0.028316846592 / 60) / 9.290304e-2,
VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter => _value,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
@@ -160,7 +157,7 @@ private double GetValueAs(VolumeFlowPerAreaUnit unit)
return unit switch
{
- VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot => baseUnitValue * 196.850394,
+ VolumeFlowPerAreaUnit.CubicFootPerMinutePerSquareFoot => baseUnitValue * 9.290304e-2 / (0.028316846592 / 60),
VolumeFlowPerAreaUnit.CubicMeterPerSecondPerSquareMeter => baseUnitValue,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumePerLength.g.cs
index a6cadbc648..b37578bc06 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumePerLength.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumePerLength.g.cs
@@ -51,7 +51,6 @@ public struct VolumePerLength
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VolumePerLength(double value, VolumePerLengthUnit unit)
{
_value = value;
@@ -131,55 +130,46 @@ public VolumePerLength(double value, VolumePerLengthUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromCubicMetersPerMeter(double cubicmeterspermeter) => new VolumePerLength(cubicmeterspermeter, VolumePerLengthUnit.CubicMeterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromCubicYardsPerFoot(double cubicyardsperfoot) => new VolumePerLength(cubicyardsperfoot, VolumePerLengthUnit.CubicYardPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromCubicYardsPerUsSurveyFoot(double cubicyardsperussurveyfoot) => new VolumePerLength(cubicyardsperussurveyfoot, VolumePerLengthUnit.CubicYardPerUsSurveyFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromImperialGallonsPerMile(double imperialgallonspermile) => new VolumePerLength(imperialgallonspermile, VolumePerLengthUnit.ImperialGallonPerMile);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromLitersPerKilometer(double litersperkilometer) => new VolumePerLength(litersperkilometer, VolumePerLengthUnit.LiterPerKilometer);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromLitersPerMeter(double literspermeter) => new VolumePerLength(literspermeter, VolumePerLengthUnit.LiterPerMeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromLitersPerMillimeter(double literspermillimeter) => new VolumePerLength(literspermillimeter, VolumePerLengthUnit.LiterPerMillimeter);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromOilBarrelsPerFoot(double oilbarrelsperfoot) => new VolumePerLength(oilbarrelsperfoot, VolumePerLengthUnit.OilBarrelPerFoot);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumePerLength FromUsGallonsPerMile(double usgallonspermile) => new VolumePerLength(usgallonspermile, VolumePerLengthUnit.UsGallonPerMile);
///
@@ -223,14 +213,14 @@ private double GetValueInBaseUnit()
return Unit switch
{
VolumePerLengthUnit.CubicMeterPerMeter => _value,
- VolumePerLengthUnit.CubicYardPerFoot => _value * 2.50838208,
- VolumePerLengthUnit.CubicYardPerUsSurveyFoot => _value * 2.50837706323584,
- VolumePerLengthUnit.ImperialGallonPerMile => _value / (1000 * 1609.344 / 4.54609),
+ VolumePerLengthUnit.CubicYardPerFoot => _value * 0.764554857984 / 0.3048,
+ VolumePerLengthUnit.CubicYardPerUsSurveyFoot => _value * 0.764554857984 * 3937 / 1200,
+ VolumePerLengthUnit.ImperialGallonPerMile => _value * 0.00454609 / 1609.344,
VolumePerLengthUnit.LiterPerKilometer => _value / 1e6,
VolumePerLengthUnit.LiterPerMeter => _value / 1000,
VolumePerLengthUnit.LiterPerMillimeter => _value,
- VolumePerLengthUnit.OilBarrelPerFoot => _value / 1.91713408,
- VolumePerLengthUnit.UsGallonPerMile => _value / (1000 * 1609.344 / 3.785411784),
+ VolumePerLengthUnit.OilBarrelPerFoot => _value * 0.158987294928 / 0.3048,
+ VolumePerLengthUnit.UsGallonPerMile => _value * 0.003785411784 / 1609.344,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
};
}
@@ -245,14 +235,14 @@ private double GetValueAs(VolumePerLengthUnit unit)
return unit switch
{
VolumePerLengthUnit.CubicMeterPerMeter => baseUnitValue,
- VolumePerLengthUnit.CubicYardPerFoot => baseUnitValue / 2.50838208,
- VolumePerLengthUnit.CubicYardPerUsSurveyFoot => baseUnitValue / 2.50837706323584,
- VolumePerLengthUnit.ImperialGallonPerMile => baseUnitValue * (1000 * 1609.344 / 4.54609),
+ VolumePerLengthUnit.CubicYardPerFoot => baseUnitValue * 0.3048 / 0.764554857984,
+ VolumePerLengthUnit.CubicYardPerUsSurveyFoot => baseUnitValue * 1200 / (0.764554857984 * 3937),
+ VolumePerLengthUnit.ImperialGallonPerMile => baseUnitValue * 1609.344 / 0.00454609,
VolumePerLengthUnit.LiterPerKilometer => baseUnitValue * 1e6,
VolumePerLengthUnit.LiterPerMeter => baseUnitValue * 1000,
VolumePerLengthUnit.LiterPerMillimeter => baseUnitValue,
- VolumePerLengthUnit.OilBarrelPerFoot => baseUnitValue * 1.91713408,
- VolumePerLengthUnit.UsGallonPerMile => baseUnitValue * (1000 * 1609.344 / 3.785411784),
+ VolumePerLengthUnit.OilBarrelPerFoot => baseUnitValue * 0.3048 / 0.158987294928,
+ VolumePerLengthUnit.UsGallonPerMile => baseUnitValue * 1609.344 / 0.003785411784,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
};
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
index 8e6df60ed4..10e2e499ce 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs
@@ -54,7 +54,6 @@ public struct VolumetricHeatCapacity
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public VolumetricHeatCapacity(double value, VolumetricHeatCapacityUnit unit)
{
_value = value;
@@ -134,55 +133,46 @@ public VolumetricHeatCapacity(double value, VolumetricHeatCapacityUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromBtusPerCubicFootDegreeFahrenheit(double btuspercubicfootdegreefahrenheit) => new VolumetricHeatCapacity(btuspercubicfootdegreefahrenheit, VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromCaloriesPerCubicCentimeterDegreeCelsius(double caloriespercubiccentimeterdegreecelsius) => new VolumetricHeatCapacity(caloriespercubiccentimeterdegreecelsius, VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromJoulesPerCubicMeterDegreeCelsius(double joulespercubicmeterdegreecelsius) => new VolumetricHeatCapacity(joulespercubicmeterdegreecelsius, VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromJoulesPerCubicMeterKelvin(double joulespercubicmeterkelvin) => new VolumetricHeatCapacity(joulespercubicmeterkelvin, VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromKilocaloriesPerCubicCentimeterDegreeCelsius(double kilocaloriespercubiccentimeterdegreecelsius) => new VolumetricHeatCapacity(kilocaloriespercubiccentimeterdegreecelsius, VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromKilojoulesPerCubicMeterDegreeCelsius(double kilojoulespercubicmeterdegreecelsius) => new VolumetricHeatCapacity(kilojoulespercubicmeterdegreecelsius, VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromKilojoulesPerCubicMeterKelvin(double kilojoulespercubicmeterkelvin) => new VolumetricHeatCapacity(kilojoulespercubicmeterkelvin, VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromMegajoulesPerCubicMeterDegreeCelsius(double megajoulespercubicmeterdegreecelsius) => new VolumetricHeatCapacity(megajoulespercubicmeterdegreecelsius, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static VolumetricHeatCapacity FromMegajoulesPerCubicMeterKelvin(double megajoulespercubicmeterkelvin) => new VolumetricHeatCapacity(megajoulespercubicmeterkelvin, VolumetricHeatCapacityUnit.MegajoulePerCubicMeterKelvin);
///
@@ -225,11 +215,11 @@ private double GetValueInBaseUnit()
{
return Unit switch
{
- VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit => _value / 1.4910660e-5,
- VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius => _value / 2.388459e-7,
+ VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit => _value * (1055.05585262 / 0.028316846592) * 1.8,
+ VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius => _value * 4.184e6,
VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius => _value,
VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin => _value,
- VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius => (_value / 2.388459e-7) * 1e3d,
+ VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius => (_value * 4.184e6) * 1e3d,
VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius => (_value) * 1e3d,
VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin => (_value) * 1e3d,
VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius => (_value) * 1e6d,
@@ -247,11 +237,11 @@ private double GetValueAs(VolumetricHeatCapacityUnit unit)
return unit switch
{
- VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit => baseUnitValue * 1.4910660e-5,
- VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius => baseUnitValue * 2.388459e-7,
+ VolumetricHeatCapacityUnit.BtuPerCubicFootDegreeFahrenheit => baseUnitValue / ((1055.05585262 / 0.028316846592) * 1.8),
+ VolumetricHeatCapacityUnit.CaloriePerCubicCentimeterDegreeCelsius => baseUnitValue / 4.184e6,
VolumetricHeatCapacityUnit.JoulePerCubicMeterDegreeCelsius => baseUnitValue,
VolumetricHeatCapacityUnit.JoulePerCubicMeterKelvin => baseUnitValue,
- VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius => (baseUnitValue * 2.388459e-7) / 1e3d,
+ VolumetricHeatCapacityUnit.KilocaloriePerCubicCentimeterDegreeCelsius => (baseUnitValue / 4.184e6) / 1e3d,
VolumetricHeatCapacityUnit.KilojoulePerCubicMeterDegreeCelsius => (baseUnitValue) / 1e3d,
VolumetricHeatCapacityUnit.KilojoulePerCubicMeterKelvin => (baseUnitValue) / 1e3d,
VolumetricHeatCapacityUnit.MegajoulePerCubicMeterDegreeCelsius => (baseUnitValue) / 1e6d,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
index cd505a45e7..0c6b8421dd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs
@@ -51,7 +51,6 @@ public struct WarpingMomentOfInertia
///
/// The numeric value to construct this quantity with.
/// The unit representation to construct this quantity with.
- /// If value is NaN or Infinity.
public WarpingMomentOfInertia(double value, WarpingMomentOfInertiaUnit unit)
{
_value = value;
@@ -116,37 +115,31 @@ public WarpingMomentOfInertia(double value, WarpingMomentOfInertiaUnit unit)
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromCentimetersToTheSixth(double centimeterstothesixth) => new WarpingMomentOfInertia(centimeterstothesixth, WarpingMomentOfInertiaUnit.CentimeterToTheSixth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromDecimetersToTheSixth(double decimeterstothesixth) => new WarpingMomentOfInertia(decimeterstothesixth, WarpingMomentOfInertiaUnit.DecimeterToTheSixth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromFeetToTheSixth(double feettothesixth) => new WarpingMomentOfInertia(feettothesixth, WarpingMomentOfInertiaUnit.FootToTheSixth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromInchesToTheSixth(double inchestothesixth) => new WarpingMomentOfInertia(inchestothesixth, WarpingMomentOfInertiaUnit.InchToTheSixth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromMetersToTheSixth(double meterstothesixth) => new WarpingMomentOfInertia(meterstothesixth, WarpingMomentOfInertiaUnit.MeterToTheSixth);
///
/// Creates a from .
///
- /// If value is NaN or Infinity.
public static WarpingMomentOfInertia FromMillimetersToTheSixth(double millimeterstothesixth) => new WarpingMomentOfInertia(millimeterstothesixth, WarpingMomentOfInertiaUnit.MillimeterToTheSixth);
///
@@ -191,8 +184,8 @@ private double GetValueInBaseUnit()
{
WarpingMomentOfInertiaUnit.CentimeterToTheSixth => _value / 1e12,
WarpingMomentOfInertiaUnit.DecimeterToTheSixth => _value / 1e6,
- WarpingMomentOfInertiaUnit.FootToTheSixth => _value * Math.Pow(0.3048, 6),
- WarpingMomentOfInertiaUnit.InchToTheSixth => _value * Math.Pow(2.54e-2, 6),
+ WarpingMomentOfInertiaUnit.FootToTheSixth => _value * 0.000801843800914862014464,
+ WarpingMomentOfInertiaUnit.InchToTheSixth => _value * 0.000000000268535866540096,
WarpingMomentOfInertiaUnit.MeterToTheSixth => _value,
WarpingMomentOfInertiaUnit.MillimeterToTheSixth => _value / 1e18,
_ => throw new NotImplementedException($"Can not convert {Unit} to base units.")
@@ -210,8 +203,8 @@ private double GetValueAs(WarpingMomentOfInertiaUnit unit)
{
WarpingMomentOfInertiaUnit.CentimeterToTheSixth => baseUnitValue * 1e12,
WarpingMomentOfInertiaUnit.DecimeterToTheSixth => baseUnitValue * 1e6,
- WarpingMomentOfInertiaUnit.FootToTheSixth => baseUnitValue / Math.Pow(0.3048, 6),
- WarpingMomentOfInertiaUnit.InchToTheSixth => baseUnitValue / Math.Pow(2.54e-2, 6),
+ WarpingMomentOfInertiaUnit.FootToTheSixth => baseUnitValue / 0.000801843800914862014464,
+ WarpingMomentOfInertiaUnit.InchToTheSixth => baseUnitValue / 0.000000000268535866540096,
WarpingMomentOfInertiaUnit.MeterToTheSixth => baseUnitValue,
WarpingMomentOfInertiaUnit.MillimeterToTheSixth => baseUnitValue * 1e18,
_ => throw new NotImplementedException($"Can not convert {Unit} to {unit}.")
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj
index 200f32feb4..552e257f67 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/RadiationEquivalentDose.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec
index 15486f8b6f..8d232e43dd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/UnitsNet.NanoFramework.RadiationEquivalentDose.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RadiationEquivalentDose
- 5.74.0
+ 6.0.0-pre014
Units.NET RadiationEquivalentDose - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework radiationequivalentdose unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDose/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/RadiationEquivalentDoseRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/RadiationEquivalentDoseRate.nfproj
index 4200e02b17..a764c389bd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/RadiationEquivalentDoseRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/RadiationEquivalentDoseRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/UnitsNet.NanoFramework.RadiationEquivalentDoseRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/UnitsNet.NanoFramework.RadiationEquivalentDoseRate.nuspec
index 4de9c020bd..903e90383c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/UnitsNet.NanoFramework.RadiationEquivalentDoseRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/UnitsNet.NanoFramework.RadiationEquivalentDoseRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RadiationEquivalentDoseRate
- 5.74.0
+ 6.0.0-pre014
Units.NET RadiationEquivalentDoseRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework radiationequivalentdoserate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationEquivalentDoseRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj
index 90f10e74cf..f2b96d78df 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/RadiationExposure.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec
index 6d8455668a..7f0381bc5c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/UnitsNet.NanoFramework.RadiationExposure.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RadiationExposure
- 5.74.0
+ 6.0.0-pre014
Units.NET RadiationExposure - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework radiationexposure unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RadiationExposure/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/Radioactivity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/Radioactivity.nfproj
index 68c026838a..760702039e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/Radioactivity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/Radioactivity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec
index 96786e8363..3d106d63a9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/UnitsNet.NanoFramework.Radioactivity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Radioactivity
- 5.74.0
+ 6.0.0-pre014
Units.NET Radioactivity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework radioactivity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Radioactivity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Ratio/Ratio.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Ratio/Ratio.nfproj
index 8e403d3951..64a1647f49 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Ratio/Ratio.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Ratio/Ratio.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec
index 3960f330fe..438bfeb813 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Ratio/UnitsNet.NanoFramework.Ratio.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Ratio
- 5.74.0
+ 6.0.0-pre014
Units.NET Ratio - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework ratio unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Ratio/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Ratio/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Ratio/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Ratio/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/RatioChangeRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/RatioChangeRate.nfproj
index 048c0c9122..7d1b463f9b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/RatioChangeRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/RatioChangeRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec
index f3543112d2..c6005fd3e0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/UnitsNet.NanoFramework.RatioChangeRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RatioChangeRate
- 5.74.0
+ 6.0.0-pre014
Units.NET RatioChangeRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework ratiochangerate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RatioChangeRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/ReactiveEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/ReactiveEnergy.nfproj
deleted file mode 100644
index c9fde49e48..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/ReactiveEnergy.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {64c918a4-27a8-3e9c-e81f-6917f0edde90}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ReactiveEnergy
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec
deleted file mode 100644
index 8e9dd759a2..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/UnitsNet.NanoFramework.ReactiveEnergy.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ReactiveEnergy
- 5.74.0
- Units.NET ReactiveEnergy - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ReactiveEnergy units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework reactiveenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactiveEnergy/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/ReactivePower.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/ReactivePower.nfproj
deleted file mode 100644
index 7dae78803f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/ReactivePower.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {6821b87e-65eb-bfdb-8fdc-8b183edf739e}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ReactivePower
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec
deleted file mode 100644
index 395b841a4a..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/UnitsNet.NanoFramework.ReactivePower.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.ReactivePower
- 5.74.0
- Units.NET ReactivePower - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds ReactivePower units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework reactivepower unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ReactivePower/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/ReciprocalArea.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/ReciprocalArea.nfproj
index b10ed5ec70..55a25d5668 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/ReciprocalArea.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/ReciprocalArea.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec
index c41e48dedb..421f20e32d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/UnitsNet.NanoFramework.ReciprocalArea.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ReciprocalArea
- 5.74.0
+ 6.0.0-pre014
Units.NET ReciprocalArea - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework reciprocalarea unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalArea/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/ReciprocalLength.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/ReciprocalLength.nfproj
index d361b6274f..048d0f98c9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/ReciprocalLength.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/ReciprocalLength.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec
index 5ec4607bce..2c5821ea1a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/UnitsNet.NanoFramework.ReciprocalLength.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ReciprocalLength
- 5.74.0
+ 6.0.0-pre014
Units.NET ReciprocalLength - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework reciprocallength unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ReciprocalLength/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/RelativeHumidity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/RelativeHumidity.nfproj
index b648bab4f7..0e8a0f01e6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/RelativeHumidity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/RelativeHumidity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec
index 0f9cbf94ab..666c44e369 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/UnitsNet.NanoFramework.RelativeHumidity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RelativeHumidity
- 5.74.0
+ 6.0.0-pre014
Units.NET RelativeHumidity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework relativehumidity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RelativeHumidity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/RotationalAcceleration.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/RotationalAcceleration.nfproj
index 60989a0fdf..5aa8a5f088 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/RotationalAcceleration.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/RotationalAcceleration.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec
index f56edeeac5..b817fc5100 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/UnitsNet.NanoFramework.RotationalAcceleration.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RotationalAcceleration
- 5.74.0
+ 6.0.0-pre014
Units.NET RotationalAcceleration - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework rotationalacceleration unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalAcceleration/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/RotationalSpeed.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/RotationalSpeed.nfproj
index 21f603ded4..626ca3764c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/RotationalSpeed.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/RotationalSpeed.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec
index c60cc76347..b541926dfe 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/UnitsNet.NanoFramework.RotationalSpeed.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RotationalSpeed
- 5.74.0
+ 6.0.0-pre014
Units.NET RotationalSpeed - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework rotationalspeed unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalSpeed/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/RotationalStiffness.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/RotationalStiffness.nfproj
index ea6a6dc19e..263ac99a43 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/RotationalStiffness.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/RotationalStiffness.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec
index 110faa21a5..f3cfb45600 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/UnitsNet.NanoFramework.RotationalStiffness.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RotationalStiffness
- 5.74.0
+ 6.0.0-pre014
Units.NET RotationalStiffness - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework rotationalstiffness unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffness/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/RotationalStiffnessPerLength.nfproj b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/RotationalStiffnessPerLength.nfproj
index 91406dfb15..91f6e1ba74 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/RotationalStiffnessPerLength.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/RotationalStiffnessPerLength.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec
index 1d189df3da..5a73c00667 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/UnitsNet.NanoFramework.RotationalStiffnessPerLength.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.RotationalStiffnessPerLength
- 5.74.0
+ 6.0.0-pre014
Units.NET RotationalStiffnessPerLength - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework rotationalstiffnessperlength unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/packages.config b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/RotationalStiffnessPerLength/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Scalar/Scalar.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Scalar/Scalar.nfproj
index 74abd92a36..959d03670d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Scalar/Scalar.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Scalar/Scalar.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec
index d006d32ab3..f8b264c088 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Scalar/UnitsNet.NanoFramework.Scalar.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Scalar
- 5.74.0
+ 6.0.0-pre014
Units.NET Scalar - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework scalar unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Scalar/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Scalar/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Scalar/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Scalar/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/SolidAngle.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/SolidAngle.nfproj
index 49f228a29c..32e06e7f7c 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/SolidAngle.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/SolidAngle.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec
index 3e8f077283..1a74c21417 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/UnitsNet.NanoFramework.SolidAngle.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SolidAngle
- 5.74.0
+ 6.0.0-pre014
Units.NET SolidAngle - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework solidangle unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SolidAngle/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/SpecificEnergy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/SpecificEnergy.nfproj
index 409bfbd817..e062571c81 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/SpecificEnergy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/SpecificEnergy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec
index b3fa224ded..9accce5aab 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/UnitsNet.NanoFramework.SpecificEnergy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SpecificEnergy
- 5.74.0
+ 6.0.0-pre014
Units.NET SpecificEnergy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework specificenergy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEnergy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/SpecificEntropy.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/SpecificEntropy.nfproj
index f94c9a5140..d4c07d679d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/SpecificEntropy.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/SpecificEntropy.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec
index 3e54ea0540..3c87b57768 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/UnitsNet.NanoFramework.SpecificEntropy.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SpecificEntropy
- 5.74.0
+ 6.0.0-pre014
Units.NET SpecificEntropy - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework specificentropy unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificEntropy/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/SpecificFuelConsumption.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/SpecificFuelConsumption.nfproj
index 98ba3a10d5..addee8e44a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/SpecificFuelConsumption.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/SpecificFuelConsumption.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec
index 6b5f6c2cd6..25074d1f48 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/UnitsNet.NanoFramework.SpecificFuelConsumption.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SpecificFuelConsumption
- 5.74.0
+ 6.0.0-pre014
Units.NET SpecificFuelConsumption - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework specificfuelconsumption unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificFuelConsumption/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/SpecificVolume.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/SpecificVolume.nfproj
index 1621150c61..7ee4926161 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/SpecificVolume.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/SpecificVolume.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec
index 7b1899997e..3038ec6214 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/UnitsNet.NanoFramework.SpecificVolume.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SpecificVolume
- 5.74.0
+ 6.0.0-pre014
Units.NET SpecificVolume - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework specificvolume unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificVolume/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/SpecificWeight.nfproj b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/SpecificWeight.nfproj
index f49f8de4ad..e8b961bba0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/SpecificWeight.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/SpecificWeight.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec
index 5adc66e602..aed9931e05 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/UnitsNet.NanoFramework.SpecificWeight.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.SpecificWeight
- 5.74.0
+ 6.0.0-pre014
Units.NET SpecificWeight - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework specificweight unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/packages.config b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/SpecificWeight/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Speed/Speed.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Speed/Speed.nfproj
index 23e92c0d24..cebcbc5345 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Speed/Speed.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Speed/Speed.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec
index 536710a5f7..5f5e34f367 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Speed/UnitsNet.NanoFramework.Speed.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Speed
- 5.74.0
+ 6.0.0-pre014
Units.NET Speed - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework speed unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Speed/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Speed/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Speed/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Speed/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/StandardVolumeFlow.nfproj b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/StandardVolumeFlow.nfproj
index 2f2506dec5..23e6f61e70 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/StandardVolumeFlow.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/StandardVolumeFlow.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec
index e2699c21db..dd62a1b826 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/UnitsNet.NanoFramework.StandardVolumeFlow.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.StandardVolumeFlow
- 5.74.0
+ 6.0.0-pre014
Units.NET StandardVolumeFlow - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework standardvolumeflow unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/packages.config b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/StandardVolumeFlow/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Temperature/Temperature.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Temperature/Temperature.nfproj
index d992e516cd..41ada396fa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Temperature/Temperature.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Temperature/Temperature.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec
index 156b356c26..5a13bdd9e7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Temperature/UnitsNet.NanoFramework.Temperature.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Temperature
- 5.74.0
+ 6.0.0-pre014
Units.NET Temperature - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework temperature unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Temperature/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Temperature/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Temperature/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Temperature/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/TemperatureChangeRate.nfproj b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/TemperatureChangeRate.nfproj
index f9b164aa12..95a6af3338 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/TemperatureChangeRate.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/TemperatureChangeRate.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec
index 1b616b5690..6d0c3cec3d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/UnitsNet.NanoFramework.TemperatureChangeRate.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.TemperatureChangeRate
- 5.74.0
+ 6.0.0-pre014
Units.NET TemperatureChangeRate - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework temperaturechangerate unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/packages.config b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureChangeRate/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/TemperatureDelta.nfproj b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/TemperatureDelta.nfproj
index 1b05c41caa..8201b03171 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/TemperatureDelta.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/TemperatureDelta.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec
index 054495db05..085e075292 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/UnitsNet.NanoFramework.TemperatureDelta.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.TemperatureDelta
- 5.74.0
+ 6.0.0-pre014
Units.NET TemperatureDelta - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework temperaturedelta unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/packages.config b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureDelta/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/TemperatureGradient.nfproj b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/TemperatureGradient.nfproj
index 5c9c4f12ab..291bab56e4 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/TemperatureGradient.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/TemperatureGradient.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec
index 921d8d8f3f..0411380f4b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/UnitsNet.NanoFramework.TemperatureGradient.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.TemperatureGradient
- 5.74.0
+ 6.0.0-pre014
Units.NET TemperatureGradient - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework temperaturegradient unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/packages.config b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/TemperatureGradient/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/ThermalConductivity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/ThermalConductivity.nfproj
index 569eb3f0f9..c281ac35ce 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/ThermalConductivity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/ThermalConductivity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec
index e1b9788b9a..7869f9f3c3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/UnitsNet.NanoFramework.ThermalConductivity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.ThermalConductivity
- 5.74.0
+ 6.0.0-pre014
Units.NET ThermalConductivity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework thermalconductivity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalConductivity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/Capacitance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/ThermalInsulance.nfproj
similarity index 81%
rename from UnitsNet.NanoFramework/GeneratedCode/Capacitance/Capacitance.nfproj
rename to UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/ThermalInsulance.nfproj
index 405694c821..0c89e9e5ef 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Capacitance/Capacitance.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/ThermalInsulance.nfproj
@@ -8,24 +8,24 @@
Debug
AnyCPU
{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}
+ {0194c08d-ffcd-78bd-9e14-66634fe6d4ea}
Library
Properties
512
UnitsNet
- UnitsNet.Capacitance
+ UnitsNet.ThermalInsulance
v1.0
bin\$(Configuration)\$(AssemblyName).xml
-
-
+
+
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/UnitsNet.NanoFramework.ThermalInsulance.nuspec
similarity index 59%
rename from UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec
rename to UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/UnitsNet.NanoFramework.ThermalInsulance.nuspec
index 7edb428fcc..b203eb402e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/UnitsNet.NanoFramework.ThermalResistance.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/UnitsNet.NanoFramework.ThermalInsulance.nuspec
@@ -1,26 +1,26 @@
- UnitsNet.nanoFramework.ThermalResistance
- 5.74.0
- Units.NET ThermalResistance - nanoFramework
+ UnitsNet.nanoFramework.ThermalInsulance
+ 6.0.0-pre014
+ Units.NET ThermalInsulance - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
MIT-0
https://github.com/angularsen/UnitsNet
false
- Adds ThermalResistance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
+ Adds ThermalInsulance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
en-US
- nanoframework thermalresistance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
+ nanoframework thermalinsulance unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/packages.config
new file mode 100644
index 0000000000..313a8dccdf
--- /dev/null
+++ b/UnitsNet.NanoFramework/GeneratedCode/ThermalInsulance/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/ThermalResistance.nfproj b/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/ThermalResistance.nfproj
deleted file mode 100644
index e6c9e8e83d..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/ThermalResistance.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {c69bdd4d-3ebd-4b8e-cffb-650903da3872}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.ThermalResistance
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/packages.config b/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/ThermalResistance/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Torque/Torque.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Torque/Torque.nfproj
index 5da7258239..9fa5c5b3db 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Torque/Torque.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Torque/Torque.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec
index 9d976501cb..b6a217d9ae 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Torque/UnitsNet.NanoFramework.Torque.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Torque
- 5.74.0
+ 6.0.0-pre014
Units.NET Torque - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework torque unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Torque/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Torque/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Torque/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Torque/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/TorquePerLength.nfproj b/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/TorquePerLength.nfproj
deleted file mode 100644
index 105238ca4d..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/TorquePerLength.nfproj
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- $(MSBuildExtensionsPath)\nanoFramework\v1.0\
-
-
-
- Debug
- AnyCPU
- {11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- {c27e1919-64f1-ce81-c6d9-b46ced745a12}
- Library
- Properties
- 512
- UnitsNet
- UnitsNet.TorquePerLength
- v1.0
- bin\$(Configuration)\$(AssemblyName).xml
-
-
-
-
-
-
-
-
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
- True
- True
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec
deleted file mode 100644
index 488155ab5c..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/UnitsNet.NanoFramework.TorquePerLength.nuspec
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- UnitsNet.nanoFramework.TorquePerLength
- 5.74.0
- Units.NET TorquePerLength - nanoFramework
- Andreas Gullberg Larsen,nanoframework
- UnitsNet
- MIT-0
- https://github.com/angularsen/UnitsNet
- false
- Adds TorquePerLength units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.
- https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png
-
-
- Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com).
- en-US
- nanoframework torqueperlength unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
-
-
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/packages.config b/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/packages.config
deleted file mode 100644
index b7286a971f..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/TorquePerLength/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/Turbidity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/Turbidity.nfproj
index d39a2f9998..79830f8bf6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/Turbidity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/Turbidity.nfproj
@@ -24,13 +24,13 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
-
- ..\packages\nanoFramework.System.Math.1.5.116\lib\System.Math.dll
+
+ ..\packages\nanoFramework.System.Math.1.5.43\lib\System.Math.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec
index 43ebd9f6ab..5f82184986 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/UnitsNet.NanoFramework.Turbidity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Turbidity
- 5.74.0
+ 6.0.0-pre014
Units.NET Turbidity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,8 +17,8 @@
en-US
nanoframework turbidity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/packages.config
index 53c5907746..ac11548cd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Turbidity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Turbidity/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/AccelerationUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/AccelerationUnit.g.cs
index b4f1c48938..a514c50ff7 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/AccelerationUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/AccelerationUnit.g.cs
@@ -30,7 +30,17 @@ public enum AccelerationUnit
FootPerSecondSquared = 3,
InchPerSecondSquared = 4,
KilometerPerSecondSquared = 5,
+
+ ///
+ /// The knot (/nɒt/) is a unit of speed equal to one nautical mile per hour, exactly 1.852 km/h (approximately 1.151 mph or 0.514 m/s).
+ ///
+ /// https://en.wikipedia.org/wiki/Knot_(unit)
KnotPerHour = 6,
+
+ ///
+ /// The knot (/nɒt/) is a unit of speed equal to one nautical mile per hour, exactly 1.852 km/h (approximately 1.151 mph or 0.514 m/s).
+ ///
+ /// https://en.wikipedia.org/wiki/Knot_(unit)
KnotPerMinute = 7,
KnotPerSecond = 8,
MeterPerSecondSquared = 9,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/AngleUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/AngleUnit.g.cs
index 20e4ff440e..ed51329da8 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/AngleUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/AngleUnit.g.cs
@@ -40,7 +40,6 @@ public enum AngleUnit
NatoMil = 13,
Radian = 14,
Revolution = 15,
- Tilt = 16,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentEnergyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentEnergyUnit.g.cs
deleted file mode 100644
index 2a8c1aba5b..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentEnergyUnit.g.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ApparentEnergyUnit
- {
- KilovoltampereHour = 1,
- MegavoltampereHour = 2,
- VoltampereHour = 3,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentPowerUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentPowerUnit.g.cs
deleted file mode 100644
index 856789bbdd..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ApparentPowerUnit.g.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ApparentPowerUnit
- {
- Gigavoltampere = 1,
- Kilovoltampere = 2,
- Megavoltampere = 3,
- Microvoltampere = 6,
- Millivoltampere = 7,
- Voltampere = 4,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/CapacitanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/CapacitanceUnit.g.cs
deleted file mode 100644
index a76cc8f2d8..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/CapacitanceUnit.g.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum CapacitanceUnit
- {
- Farad = 1,
- Kilofarad = 2,
- Megafarad = 3,
- Microfarad = 4,
- Millifarad = 5,
- Nanofarad = 6,
- Picofarad = 7,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs
index 79748b807b..258f5065da 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/CoefficientOfThermalExpansionUnit.g.cs
@@ -25,12 +25,6 @@ namespace UnitsNet.Units
public enum CoefficientOfThermalExpansionUnit
{
- [System.Obsolete("Use PerDegreeCelsius instead.")]
- InverseDegreeCelsius = 1,
- [System.Obsolete("Use PerDegreeFahrenheit instead.")]
- InverseDegreeFahrenheit = 2,
- [System.Obsolete("Use PerKelvin instead.")]
- InverseKelvin = 3,
PerDegreeCelsius = 9,
PerDegreeFahrenheit = 11,
PerKelvin = 13,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs
index 70b4e91fc7..638b21b01a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/DensityUnit.g.cs
@@ -70,7 +70,7 @@ public enum DensityUnit
PoundPerCubicMillimeter = 39,
///
- /// Calculated from the definition of pound and yard compared to metric kilogram and meter.
+ /// Calculated from the definition of pound and Cubic yard compared to metric kilogram and meter.
///
PoundPerCubicYard = 58,
PoundPerImperialGallon = 40,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialAcUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialAcUnit.g.cs
deleted file mode 100644
index ada8068172..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialAcUnit.g.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ElectricPotentialAcUnit
- {
- KilovoltAc = 1,
- MegavoltAc = 2,
- MicrovoltAc = 3,
- MillivoltAc = 4,
- VoltAc = 5,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialDcUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialDcUnit.g.cs
deleted file mode 100644
index 224c9c4c30..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ElectricPotentialDcUnit.g.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ElectricPotentialDcUnit
- {
- KilovoltDc = 1,
- MegavoltDc = 2,
- MicrovoltDc = 3,
- MillivoltDc = 4,
- VoltDc = 5,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/EnergyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/EnergyUnit.g.cs
index 392f8f736a..87b58d3a8a 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/EnergyUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/EnergyUnit.g.cs
@@ -30,14 +30,34 @@ public enum EnergyUnit
DecathermEc = 3,
DecathermImperial = 4,
DecathermUs = 5,
+
+ ///
+ /// In physics, an electronvolt (symbol eV, also written electron-volt and electron volt) is the measure of an amount of kinetic energy gained by a single electron accelerating from rest through an electric potential difference of one volt in vacuum. When used as a unit of energy, the numerical value of 1 eV in joules (symbol J) is equivalent to the numerical value of the charge of an electron in coulombs (symbol C). Under the 2019 redefinition of the SI base units, this sets 1 eV equal to the exact value 1.602176634×10−19 J.
+ ///
+ /// https://en.wikipedia.org/wiki/Electronvolt
ElectronVolt = 6,
+
+ ///
+ /// The erg is a unit of energy equal to 10−7 joules (100 nJ). It originated in the Centimetre–gram–second system of units (CGS). It has the symbol erg. The erg is not an SI unit. Its name is derived from ergon (ἔργον), a Greek word meaning 'work' or 'task'.
+ ///
+ /// https://en.wikipedia.org/wiki/Erg
Erg = 7,
+
+ ///
+ /// A pound-foot (lb⋅ft), abbreviated from pound-force foot (lbf · ft), is a unit of torque representing one pound of force acting at a perpendicular distance of one foot from a pivot point. Conversely one foot pound-force (ft · lbf) is the moment about an axis that applies one pound-force at a radius of one foot.
+ ///
+ /// https://en.wikipedia.org/wiki/Pound-foot_(torque)
FootPound = 8,
GigabritishThermalUnit = 9,
GigaelectronVolt = 10,
Gigajoule = 11,
GigawattDay = 12,
GigawattHour = 13,
+
+ ///
+ /// A horsepower-hour (symbol: hp⋅h) is an outdated unit of energy, not used in the International System of Units. The unit represents an amount of work a horse is supposed capable of delivering during an hour (1 horsepower integrated over a time interval of an hour).
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower-hour
HorsepowerHour = 14,
Joule = 15,
KilobritishThermalUnit = 16,
@@ -60,8 +80,23 @@ public enum EnergyUnit
Terajoule = 37,
TerawattDay = 30,
TerawattHour = 31,
+
+ ///
+ /// The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.
+ ///
+ /// https://en.wikipedia.org/wiki/Therm
ThermEc = 32,
+
+ ///
+ /// The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.
+ ///
+ /// https://en.wikipedia.org/wiki/Therm
ThermImperial = 33,
+
+ ///
+ /// The therm (symbol, thm) is a non-SI unit of heat energy equal to 100,000 British thermal units (BTU), and approximately 105 megajoules, 29.3 kilowatt-hours, 25,200 kilocalories and 25.2 thermies. One therm is the energy content of approximately 100 cubic feet (2.83 cubic metres) of natural gas at standard temperature and pressure. However, the BTU is not standardised worldwide, with slightly different values in the EU, UK, and United States, meaning that the energy content of the therm also varies by territory.
+ ///
+ /// https://en.wikipedia.org/wiki/Therm
ThermUs = 34,
WattDay = 35,
WattHour = 36,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/FrequencyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/FrequencyUnit.g.cs
index 370d1d3ccd..d50f23ceb5 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/FrequencyUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/FrequencyUnit.g.cs
@@ -26,7 +26,6 @@ namespace UnitsNet.Units
public enum FrequencyUnit
{
BeatPerMinute = 1,
- BUnit = 2,
CyclePerHour = 3,
CyclePerMinute = 4,
Gigahertz = 5,
@@ -36,6 +35,11 @@ public enum FrequencyUnit
Microhertz = 16,
Millihertz = 21,
PerSecond = 9,
+
+ ///
+ /// In SI units, angular frequency is normally presented with the unit radian per second, and need not express a rotational value. The unit hertz (Hz) is dimensionally equivalent, but by convention it is only used for frequency f, never for angular frequency ω. This convention is used to help avoid the confusion that arises when dealing with quantities such as frequency and angular quantities because the units of measure (such as cycle or radian) are considered to be one and hence may be omitted when expressing quantities in terms of SI units.
+ ///
+ /// https://en.wikipedia.org/wiki/Angular_frequency
RadianPerSecond = 10,
Terahertz = 11,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/HeatFluxUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/HeatFluxUnit.g.cs
index a03b4d90e6..0a3da3b723 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/HeatFluxUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/HeatFluxUnit.g.cs
@@ -25,9 +25,13 @@ namespace UnitsNet.Units
public enum HeatFluxUnit
{
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BtuPerHourSquareFoot = 1,
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BtuPerMinuteSquareFoot = 2,
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BtuPerSecondSquareFoot = 3,
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BtuPerSecondSquareInch = 4,
CaloriePerSecondSquareCentimeter = 5,
CentiwattPerSquareMeter = 6,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs
index beaabc3f3b..1a52bffbfe 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/HeatTransferCoefficientUnit.g.cs
@@ -26,8 +26,6 @@ namespace UnitsNet.Units
public enum HeatTransferCoefficientUnit
{
BtuPerHourSquareFootDegreeFahrenheit = 11,
- [System.Obsolete("The name of this definition incorrectly omitted time as divisor, please use BtuPerHourSquareFootDegreeFahrenheit instead")]
- BtuPerSquareFootDegreeFahrenheit = 1,
CaloriePerHourSquareMeterDegreeCelsius = 5,
KilocaloriePerHourSquareMeterDegreeCelsius = 8,
WattPerSquareMeterCelsius = 2,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/LengthUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/LengthUnit.g.cs
index 9323e39ba8..0c92578089 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/LengthUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/LengthUnit.g.cs
@@ -38,6 +38,11 @@ public enum LengthUnit
/// https://en.wikipedia.org/wiki/Astronomical_unit
AstronomicalUnit = 2,
Centimeter = 3,
+
+ ///
+ /// The chain (abbreviated ch) is a unit of length equal to 66 feet (22 yards), used in both the US customary and Imperial unit systems. It is subdivided into 100 links. There are 10 chains in a furlong, and 80 chains in one statute mile. In metric terms, it is 20.1168 m long.
+ ///
+ /// https://en.wikipedia.org/wiki/Chain_(unit)
Chain = 4,
///
@@ -47,14 +52,39 @@ public enum LengthUnit
DataMile = 5,
Decameter = 6,
Decimeter = 7,
+
+ ///
+ /// The pica is a typographic unit of measure corresponding to approximately 1⁄6 of an inch, or from 1⁄68 to 1⁄73 of a foot. One pica is further divided into 12 points.
+ ///
+ /// https://en.wikipedia.org/wiki/Pica_(typography)
DtpPica = 8,
+
+ ///
+ /// The desktop publishing point (DTP) is defined as 1⁄72 of an inch (1/72 × 25.4 mm ≈ 0.353 mm) and, as with earlier American point sizes, is considered to be 1⁄12 of a pica.
+ ///
+ /// https://en.wikipedia.org/wiki/Point_(typography)
DtpPoint = 9,
Fathom = 10,
Femtometer = 48,
+
+ ///
+ /// The foot (pl. feet; standard symbol: ft) is a unit of length in the British imperial and United States customary systems of measurement. The prime symbol, ′, is commonly used to represent the foot. In both customary and imperial units, one foot comprises 12 inches, and one yard comprises three feet. Since an international agreement in 1959, the foot is defined as equal to exactly 0.3048 meters.
+ ///
+ /// https://en.wikipedia.org/wiki/Foot_(unit)
Foot = 11,
Gigameter = 44,
+
+ ///
+ /// The hand is a non-SI unit of measurement of length standardized to 4 in (101.6 mm). It is used to measure the height of horses in many English-speaking countries, including Australia, Canada, Ireland, the United Kingdom, and the United States. It was originally based on the breadth of a human hand.
+ ///
+ /// https://en.wikipedia.org/wiki/Hand_(unit)
Hand = 12,
Hectometer = 13,
+
+ ///
+ /// The inch (symbol: in or ″) is a unit of length in the British Imperial and the United States customary systems of measurement. It is equal to 1/36 yard or 1/12 of a foot. Derived from the Roman uncia ("twelfth"), the word inch is also sometimes used to translate similar units in other measurement systems, usually understood as deriving from the width of the human thumb.
+ ///
+ /// https://en.wikipedia.org/wiki/Inch
Inch = 14,
Kilofoot = 45,
KilolightYear = 15,
@@ -90,7 +120,17 @@ public enum LengthUnit
/// https://en.wikipedia.org/wiki/Parsec
Parsec = 29,
Picometer = 43,
+
+ ///
+ /// The American pica of 0.16604 inches (~4.217 mm) was established by the United States Type Founders' Association in 1886. In TeX one pica is 400⁄2409 of an inch.
+ ///
+ /// https://en.wikipedia.org/wiki/Pica_(typography)
PrinterPica = 30,
+
+ ///
+ /// In typography, the point is the smallest unit of measure. It is used for measuring font size, leading, and other items on a printed page. In modern times this size of the point has been approximated as exactly 1⁄72.27 (0.01383700013837) of the inch by Donald Knuth for the default unit of his TeX computer typesetting system and is thus sometimes known as the TeX point.
+ ///
+ /// https://en.wikipedia.org/wiki/Point_(typography)
PrinterPoint = 31,
Shackle = 32,
@@ -99,6 +139,11 @@ public enum LengthUnit
///
/// https://en.wikipedia.org/wiki/Stellar_classification
SolarRadius = 33,
+
+ ///
+ /// A twip (abbreviating "twentieth of a point" or "twentieth of an inch point") is a typographical measurement, defined as 1⁄20 of a typographical point. One twip is 1⁄1440 inch, or ~17.64 μm.
+ ///
+ /// https://en.wikipedia.org/wiki/Twip
Twip = 34,
///
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/LuminosityUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/LuminosityUnit.g.cs
index 44cdfec58c..f15cfe1cef 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/LuminosityUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/LuminosityUnit.g.cs
@@ -36,7 +36,11 @@ public enum LuminosityUnit
Nanowatt = 9,
Petawatt = 10,
Picowatt = 11,
- /// https://www.britannica.com/science/luminosity
+
+ ///
+ /// The IAU has defined a nominal solar luminosity of 3.828×10^26 W to promote publication of consistent and comparable values in units of the solar luminosity.
+ ///
+ /// https://en.wikipedia.org/wiki/Luminosity#Measurement
SolarLuminosity = 12,
Terawatt = 13,
Watt = 14,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs
index 33c92670cb..05827647fd 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/MassMomentOfInertiaUnit.g.cs
@@ -36,11 +36,11 @@ public enum MassMomentOfInertiaUnit
KilotonneSquareCentimeter = 9,
KilotonneSquareDecimeter = 10,
KilotonneSquareMeter = 11,
- KilotonneSquareMilimeter = 12,
+ KilotonneSquareMillimeter = 12,
MegatonneSquareCentimeter = 13,
MegatonneSquareDecimeter = 14,
MegatonneSquareMeter = 15,
- MegatonneSquareMilimeter = 16,
+ MegatonneSquareMillimeter = 16,
MilligramSquareCentimeter = 17,
MilligramSquareDecimeter = 18,
MilligramSquareMeter = 19,
@@ -52,7 +52,7 @@ public enum MassMomentOfInertiaUnit
TonneSquareCentimeter = 25,
TonneSquareDecimeter = 26,
TonneSquareMeter = 27,
- TonneSquareMilimeter = 28,
+ TonneSquareMillimeter = 28,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/MassUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/MassUnit.g.cs
index 40dca115f1..8bf661827e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/MassUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/MassUnit.g.cs
@@ -106,6 +106,11 @@ public enum MassUnit
///
/// http://en.wikipedia.org/wiki/Stone_(unit)
Stone = 24,
+
+ ///
+ /// The tonne is a unit of mass equal to 1,000 kilograms. It is a non-SI unit accepted for use with SI. It is also referred to as a metric ton in the United States to distinguish it from the non-metric units of the short ton (United States customary units) and the long ton (British imperial units). It is equivalent to approximately 2,204.6 pounds, 1.102 short tons, and 0.984 long tons.
+ ///
+ /// https://en.wikipedia.org/wiki/Tonne
Tonne = 25,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs
index 9b57db7199..0ef3c52664 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/PorousMediumPermeabilityUnit.g.cs
@@ -25,6 +25,11 @@ namespace UnitsNet.Units
public enum PorousMediumPermeabilityUnit
{
+
+ ///
+ /// The darcy (or darcy unit) and millidarcy (md or mD) are units of permeability, named after Henry Darcy. They are not SI units, but they are widely used in petroleum engineering and geology.
+ ///
+ /// https://en.wikipedia.org/wiki/Darcy_(unit)
Darcy = 1,
Microdarcy = 2,
Millidarcy = 3,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/PowerUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/PowerUnit.g.cs
index e5b59a40ca..c0ddfe10ec 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/PowerUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/PowerUnit.g.cs
@@ -25,23 +25,49 @@ namespace UnitsNet.Units
public enum PowerUnit
{
+
+ ///
+ /// Boiler horsepower is a boiler's capacity to deliver steam to a steam engine and is not the same unit of power as the 550 ft lb/s definition. One boiler horsepower is equal to the thermal energy rate required to evaporate 34.5 pounds (15.6 kg) of fresh water at 212 °F (100 °C) in one hour.
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower#Boiler_horsepower
BoilerHorsepower = 1,
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BritishThermalUnitPerHour = 2,
Decawatt = 3,
Deciwatt = 4,
+
+ ///
+ /// Nameplates on electrical motors show their power output, not the power input (the power delivered at the shaft, not the power consumed to drive the motor). This power output is ordinarily stated in watts or kilowatts. In the United States, the power output is stated in horsepower, which for this purpose is defined as exactly 746 W.
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower#Electrical_horsepower
ElectricalHorsepower = 5,
Femtowatt = 6,
GigajoulePerHour = 7,
Gigawatt = 8,
+
+ ///
+ /// Hydraulic horsepower can represent the power available within hydraulic machinery, power through the down-hole nozzle of a drilling rig, or can be used to estimate the mechanical power needed to generate a known hydraulic flow rate.
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower#Hydraulic_horsepower
HydraulicHorsepower = 9,
JoulePerHour = 10,
KilobritishThermalUnitPerHour = 11,
KilojoulePerHour = 12,
Kilowatt = 13,
+
+ ///
+ /// Assuming the third CGPM (1901, CR 70) definition of standard gravity, gn = 9.80665 m/s2, is used to define the pound-force as well as the kilogram force, and the international avoirdupois pound (1959), one imperial horsepower is: 76.0402249 × 9.80665 kg⋅m2/s3
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower#Imperial_horsepower
MechanicalHorsepower = 14,
MegabritishThermalUnitPerHour = 15,
MegajoulePerHour = 16,
Megawatt = 17,
+
+ ///
+ /// DIN 66036 defines one metric horsepower as the power to raise a mass of 75 kilograms against the Earth's gravitational force over a distance of one metre in one second:[18] 75 kg × 9.80665 m/s2 × 1 m / 1 s = 75 kgf⋅m/s = 1 PS. This is equivalent to 735.49875 W, or 98.6% of an imperial horsepower.
+ ///
+ /// https://en.wikipedia.org/wiki/Horsepower#Metric_horsepower_(PS,_KM,_cv,_hk,_pk,_k,_ks,_ch)
MetricHorsepower = 18,
Microwatt = 19,
MillijoulePerHour = 20,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs
index 69a642d708..c25981482f 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs
@@ -25,20 +25,44 @@ namespace UnitsNet.Units
public enum PressureUnit
{
+
+ ///
+ /// The standard atmosphere (symbol: atm) is a unit of pressure defined as 101325 Pa. It is sometimes used as a reference pressure or standard pressure. It is approximately equal to Earth's average atmospheric pressure at sea level.
+ ///
+ /// https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)
Atmosphere = 1,
+
+ ///
+ /// The bar is a metric unit of pressure defined as 100,000 Pa (100 kPa), though not part of the International System of Units (SI). A pressure of 1 bar is slightly less than the current average atmospheric pressure on Earth at sea level (approximately 1.013 bar).
+ ///
+ /// https://en.wikipedia.org/wiki/Bar_(unit)
Bar = 2,
Centibar = 3,
CentimeterOfWaterColumn = 48,
Decapascal = 4,
Decibar = 5,
DynePerSquareCentimeter = 6,
- FootOfElevation = 7,
FootOfHead = 8,
Gigapascal = 9,
Hectopascal = 10,
+
+ ///
+ /// Inch of mercury (inHg and ″Hg) is a non-SI unit of measurement for pressure. It is used for barometric pressure in weather reports, refrigeration and aviation in the United States. It is the pressure exerted by a column of mercury 1 inch (25.4 mm) in height at the standard acceleration of gravity.
+ ///
+ /// https://en.wikipedia.org/wiki/Inch_of_mercury
InchOfMercury = 11,
+
+ ///
+ /// Inches of water is a non-SI unit for pressure. It is defined as the pressure exerted by a column of water of 1 inch in height at defined conditions. At a temperature of 4 °C (39.2 °F) pure water has its highest density (1000 kg/m3). At that temperature and assuming the standard acceleration of gravity, 1 inAq is approximately 249.082 pascals (0.0361263 psi).
+ ///
+ /// https://en.wikipedia.org/wiki/Inch_of_water
InchOfWaterColumn = 12,
Kilobar = 13,
+
+ ///
+ /// A kilogram-force per centimetre square (kgf/cm2), often just kilogram per square centimetre (kg/cm2), or kilopond per centimetre square (kp/cm2) is a deprecated unit of pressure using metric units. It is not a part of the International System of Units (SI), the modern metric system. 1 kgf/cm2 equals 98.0665 kPa (kilopascals). It is also known as a technical atmosphere (symbol: at).
+ ///
+ /// https://en.wikipedia.org/wiki/Kilogram-force_per_square_centimetre
KilogramForcePerSquareCentimeter = 14,
KilogramForcePerSquareMeter = 15,
KilogramForcePerSquareMillimeter = 16,
@@ -52,12 +76,21 @@ public enum PressureUnit
Megabar = 24,
MeganewtonPerSquareMeter = 25,
Megapascal = 26,
- MeterOfElevation = 27,
MeterOfHead = 28,
+
+ ///
+ /// A centimetre of water is defined as the pressure exerted by a column of water of 1 cm in height at 4 °C (temperature of maximum density) at the standard acceleration of gravity, so that 1 cmH2O (4°C) = 999.9720 kg/m3 × 9.80665 m/s2 × 1 cm = 98.063754138 Pa, but conventionally a nominal maximum water density of 1000 kg/m3 is used, giving 98.0665 Pa.
+ ///
+ /// https://en.wikipedia.org/wiki/Centimetre_or_millimetre_of_water
MeterOfWaterColumn = 57,
Microbar = 29,
Micropascal = 30,
Millibar = 31,
+
+ ///
+ /// A millimetre of mercury is a manometric unit of pressure, formerly defined as the extra pressure generated by a column of mercury one millimetre high, and currently defined as exactly 133.322387415 pascals.
+ ///
+ /// https://en.wikipedia.org/wiki/Millimetre_of_mercury
MillimeterOfMercury = 32,
MillimeterOfWaterColumn = 33,
Millipascal = 34,
@@ -69,10 +102,20 @@ public enum PressureUnit
PoundForcePerSquareInch = 40,
PoundForcePerSquareMil = 41,
PoundPerInchSecondSquared = 42,
+
+ ///
+ /// A kilogram-force per centimetre square (kgf/cm2), often just kilogram per square centimetre (kg/cm2), or kilopond per centimetre square (kp/cm2) is a deprecated unit of pressure using metric units. It is not a part of the International System of Units (SI), the modern metric system. 1 kgf/cm2 equals 98.0665 kPa (kilopascals). It is also known as a technical atmosphere (symbol: at).
+ ///
+ /// https://en.wikipedia.org/wiki/Kilogram-force_per_square_centimetre
TechnicalAtmosphere = 43,
TonneForcePerSquareCentimeter = 44,
TonneForcePerSquareMeter = 45,
TonneForcePerSquareMillimeter = 46,
+
+ ///
+ /// The torr (symbol: Torr) is a unit of pressure based on an absolute scale, defined as exactly 1/760 of a standard atmosphere (101325 Pa). Thus one torr is exactly 101325/760 pascals (≈ 133.32 Pa).
+ ///
+ /// https://en.wikipedia.org/wiki/Torr
Torr = 47,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ReactiveEnergyUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ReactiveEnergyUnit.g.cs
deleted file mode 100644
index d48f6482a1..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ReactiveEnergyUnit.g.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ReactiveEnergyUnit
- {
- KilovoltampereReactiveHour = 1,
- MegavoltampereReactiveHour = 2,
- VoltampereReactiveHour = 3,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ReactivePowerUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ReactivePowerUnit.g.cs
deleted file mode 100644
index 32e7a9ede9..0000000000
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ReactivePowerUnit.g.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-// ReSharper disable once CheckNamespace
-namespace UnitsNet.Units
-{
- // Disable missing XML comment warnings for the generated unit enums.
- #pragma warning disable 1591
-
- public enum ReactivePowerUnit
- {
- GigavoltampereReactive = 1,
- KilovoltampereReactive = 2,
- MegavoltampereReactive = 3,
- VoltampereReactive = 4,
- }
-
- #pragma warning restore 1591
-}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs
index f647a17cf6..6801a748fc 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/SpecificFuelConsumptionUnit.g.cs
@@ -25,9 +25,9 @@ namespace UnitsNet.Units
public enum SpecificFuelConsumptionUnit
{
- GramPerKiloNewtonSecond = 1,
+ GramPerKilonewtonSecond = 1,
KilogramPerKilogramForceHour = 2,
- KilogramPerKiloNewtonSecond = 3,
+ KilogramPerKilonewtonSecond = 3,
PoundMassPerPoundForceHour = 4,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/ThermalResistanceUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/ThermalInsulanceUnit.g.cs
similarity index 81%
rename from UnitsNet.NanoFramework/GeneratedCode/Units/ThermalResistanceUnit.g.cs
rename to UnitsNet.NanoFramework/GeneratedCode/Units/ThermalInsulanceUnit.g.cs
index 3fdcc10310..7f7b5a245e 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/ThermalResistanceUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/ThermalInsulanceUnit.g.cs
@@ -23,14 +23,14 @@ namespace UnitsNet.Units
// Disable missing XML comment warnings for the generated unit enums.
#pragma warning disable 1591
- public enum ThermalResistanceUnit
+ public enum ThermalInsulanceUnit
{
- HourSquareFeetDegreeFahrenheitPerBtu = 1,
- SquareCentimeterHourDegreeCelsiusPerKilocalorie = 2,
- SquareCentimeterKelvinPerWatt = 3,
- SquareMeterDegreeCelsiusPerWatt = 4,
+ HourSquareFeetDegreeFahrenheitPerBtu = 2,
+ SquareCentimeterHourDegreeCelsiusPerKilocalorie = 6,
+ SquareCentimeterKelvinPerWatt = 7,
+ SquareMeterDegreeCelsiusPerWatt = 3,
SquareMeterKelvinPerKilowatt = 5,
- SquareMeterKelvinPerWatt = 6,
+ SquareMeterKelvinPerWatt = 4,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeConcentrationUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeConcentrationUnit.g.cs
index b60c944f4a..5624e121d1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeConcentrationUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeConcentrationUnit.g.cs
@@ -25,26 +25,26 @@ namespace UnitsNet.Units
public enum VolumeConcentrationUnit
{
- CentilitersPerLiter = 1,
- CentilitersPerMililiter = 2,
- DecilitersPerLiter = 3,
- DecilitersPerMililiter = 4,
+ CentiliterPerLiter = 1,
+ CentiliterPerMilliliter = 2,
+ DeciliterPerLiter = 3,
+ DeciliterPerMilliliter = 4,
DecimalFraction = 5,
- LitersPerLiter = 6,
- LitersPerMililiter = 7,
- MicrolitersPerLiter = 8,
- MicrolitersPerMililiter = 9,
- MillilitersPerLiter = 10,
- MillilitersPerMililiter = 11,
- NanolitersPerLiter = 12,
- NanolitersPerMililiter = 13,
+ LiterPerLiter = 6,
+ LiterPerMilliliter = 7,
+ MicroliterPerLiter = 8,
+ MicroliterPerMilliliter = 9,
+ MilliliterPerLiter = 10,
+ MilliliterPerMilliliter = 11,
+ NanoliterPerLiter = 12,
+ NanoliterPerMilliliter = 13,
PartPerBillion = 14,
PartPerMillion = 15,
PartPerThousand = 16,
PartPerTrillion = 17,
Percent = 18,
- PicolitersPerLiter = 19,
- PicolitersPerMililiter = 20,
+ PicoliterPerLiter = 19,
+ PicoliterPerMilliliter = 20,
}
#pragma warning restore 1591
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs
index c35715428b..84dbccfb05 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumeUnit.g.cs
@@ -25,20 +25,55 @@ namespace UnitsNet.Units
public enum VolumeUnit
{
+
+ ///
+ /// An acre-foot is 43,560 cubic feet (~1,233.5 m3).
+ ///
+ /// https://en.wikipedia.org/wiki/Acre-foot
AcreFoot = 1,
+
+ ///
+ /// In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).
+ ///
+ /// https://en.wikipedia.org/wiki/Tablespoon#Australia
AuTablespoon = 2,
+
+ ///
+ /// The board foot or board-foot is a unit of measurement for the volume of lumber in the United States and Canada. It equals the volume of a board that is one-foot (305 mm) in length, one-foot (305 mm) in width, and one-inch (25.4 mm) in thickness.
+ ///
+ /// https://en.wikipedia.org/wiki/Board_foot
BoardFoot = 3,
Centiliter = 4,
CubicCentimeter = 5,
CubicDecimeter = 6,
+
+ ///
+ /// The cubic foot (symbol ft3 or cu ft) is an imperial and US customary (non-metric) unit of volume, used in the United States and the United Kingdom. It is defined as the volume of a cube with sides of one foot (0.3048 m) in length.
+ ///
+ /// https://en.wikipedia.org/wiki/Cubic_foot
CubicFoot = 7,
CubicHectometer = 8,
+
+ ///
+ /// The cubic inch (symbol in3) is a unit of volume in the Imperial units and United States customary units systems. It is the volume of a cube with each of its three dimensions (length, width, and height) being one inch long which is equivalent to 1/231 of a US gallon.
+ ///
+ /// https://en.wikipedia.org/wiki/Cubic_yard
CubicInch = 9,
CubicKilometer = 10,
CubicMeter = 11,
CubicMicrometer = 12,
+
+ ///
+ /// A cubic mile (abbreviation: cu mi or mi3) is an imperial and US customary (non-SI non-metric) unit of volume, used in the United States, Canada and the United Kingdom. It is defined as the volume of a cube with sides of 1 mile (63360 inches, 5280 feet, 1760 yards or ~1.609 kilometres) in length.
+ ///
+ /// https://en.wikipedia.org/wiki/Cubic_mile
CubicMile = 13,
CubicMillimeter = 14,
+
+ ///
+ /// A cubic yard is an Imperial / U.S. customary (non-SI non-metric) unit of volume, used in Canada and the United States. It is defined as the volume of a cube with sides of 1 yard (3 feet, 36 inches, 0.9144 meters) in length.
+ ///
+ /// https://en.wikipedia.org/wiki/Cubic_yard
CubicYard = 15,
Decaliter = 16,
DecausGallon = 17,
@@ -48,6 +83,11 @@ public enum VolumeUnit
HectocubicMeter = 21,
Hectoliter = 22,
HectousGallon = 23,
+
+ ///
+ /// Fluid barrels vary depending on what is being measured and where. In the UK a beer barrel is 36 imperial gallons (43 US gal; ~164 L).
+ ///
+ /// https://en.wikipedia.org/wiki/Barrel_(unit)#Fluid_barrel_in_the_US_and_UK
ImperialBeerBarrel = 24,
///
@@ -55,8 +95,23 @@ public enum VolumeUnit
///
/// https://en.wikipedia.org/wiki/Gallon#Imperial_gallon
ImperialGallon = 25,
+
+ ///
+ /// An imperial fluid ounce is 1⁄20 of an imperial pint, 1⁄160 of an imperial gallon or exactly 28.4130625 mL.
+ ///
+ /// https://en.wikipedia.org/wiki/Fluid_ounce
ImperialOunce = 26,
+
+ ///
+ /// The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.
+ ///
+ /// https://en.wikipedia.org/wiki/Pint#Imperial_pint
ImperialPint = 27,
+
+ ///
+ /// The imperial quart, which is used for both liquid and dry capacity, is equal to one quarter of an imperial gallon, or exactly 1.1365225 liters.
+ ///
+ /// https://en.wikipedia.org/wiki/Quart#Imperial_quart
ImperialQuart = 57,
KilocubicFoot = 28,
KilocubicMeter = 29,
@@ -68,14 +123,44 @@ public enum VolumeUnit
MegaimperialGallon = 35,
Megaliter = 36,
MegausGallon = 37,
+
+ ///
+ /// Australia, Canada, New Zealand, and some other members of the Commonwealth of Nations, being former British colonies that have since metricated, employ a metric cup of 250 millilitres. Although derived from the metric system, it is not an SI unit.
+ ///
+ /// https://en.wikipedia.org/wiki/Cup_(unit)#Metric_cup
MetricCup = 38,
+
+ ///
+ /// The metric teaspoon as a unit of culinary measure is 5 ml (0.18 imp fl oz; 0.17 US fl oz),[17] equal to 5 cm3, 1⁄3 UK/Canadian metric tablespoon, or 1⁄4 Australian metric tablespoon.
+ ///
+ /// https://en.wikipedia.org/wiki/Teaspoon#Metric_teaspoon
MetricTeaspoon = 39,
Microliter = 40,
Milliliter = 41,
Nanoliter = 53,
+
+ ///
+ /// In the oil industry, one barrel (unit symbol bbl) is a unit of volume used for measuring oil defined as exactly 42 US gallons, approximately 159 liters, or 35 imperial gallons.
+ ///
+ /// https://en.wikipedia.org/wiki/Barrel_(unit)#Oil_barrel
OilBarrel = 42,
+
+ ///
+ /// In nutrition labeling in the U.S. and the U.K., a tablespoon is defined as 15 ml (0.51 US fl oz). In Australia, the definition of the tablespoon is 20 ml (0.70 imp fl oz).
+ ///
+ /// https://en.wikipedia.org/wiki/Tablespoon#International
UkTablespoon = 43,
+
+ ///
+ /// Fluid barrels vary depending on what is being measured and where. In the US most fluid barrels (apart from oil) are 31.5 US gallons (26 imp gal; 119 L) (half a hogshead), but a beer barrel is 31 US gallons (26 imp gal; 117 L).
+ ///
+ /// https://en.wikipedia.org/wiki/Barrel_(unit)#Fluid_barrel_in_the_US_and_UK
UsBeerBarrel = 44,
+
+ ///
+ /// In the United States, the customary cup is half of a liquid pint or 1⁄16 US customary gallon which is 236.5882365 milliliters exactly.
+ ///
+ /// https://en.wikipedia.org/wiki/Cup_(unit)#Customary_cup
UsCustomaryCup = 45,
///
@@ -83,11 +168,41 @@ public enum VolumeUnit
///
/// https://en.wikipedia.org/wiki/Gallon#US_liquid_gallon
UsGallon = 46,
+
+ ///
+ /// The cup currently used in the United States for nutrition labelling is defined in United States law as 240 ml.
+ ///
+ /// https://en.wikipedia.org/wiki/Cup_(unit)#Legal_cup
UsLegalCup = 47,
+
+ ///
+ /// A US customary fluid ounce is 1⁄16 of a US liquid pint and 1⁄128 of a US liquid gallon or exactly 29.5735295625 mL, making it about 4.08% larger than the imperial fluid ounce.
+ ///
+ /// https://en.wikipedia.org/wiki/Fluid_ounce
UsOunce = 48,
+
+ ///
+ /// The pint is a unit of volume or capacity in both the imperial and United States customary measurement systems. In both of those systems it is traditionally one eighth of a gallon. The British imperial pint is about 20% larger than the American pint because the two systems are defined differently.
+ ///
+ /// https://en.wikipedia.org/wiki/Pint#US_liquid_pint
UsPint = 49,
+
+ ///
+ /// The US liquid quart equals 57.75 cubic inches, which is exactly equal to 0.946352946 L.
+ ///
+ /// https://en.wikipedia.org/wiki/Quart#US_liquid_quart
UsQuart = 50,
+
+ ///
+ /// The traditional U.S. interpretation of the tablespoon as a unit of volume is: 1 US tablespoon = 4 fluid drams, or 3 teaspoons or 1/2 US fluid ounce (≈ 14.8 ml)
+ ///
+ /// https://en.wikipedia.org/wiki/Tablespoon#United_States
UsTablespoon = 51,
+
+ ///
+ /// As a unit of culinary measure, one teaspoon in the United States is 1⁄3 tablespoon, exactly 4.92892159375 ml, 1 1⁄3 US fluid drams, 1⁄6 US fl oz, 1⁄48 US cup, 1⁄768 US liquid gallon, or 77⁄256 (0.30078125) cubic inches.
+ ///
+ /// https://en.wikipedia.org/wiki/Teaspoon#United_States_customary_unit
UsTeaspoon = 52,
}
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs
index e3fb1141fb..59ae226aa2 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs
+++ b/UnitsNet.NanoFramework/GeneratedCode/Units/VolumetricHeatCapacityUnit.g.cs
@@ -25,6 +25,7 @@ namespace UnitsNet.Units
public enum VolumetricHeatCapacityUnit
{
+ /// Based on the International Table (IT) definition of the British thermal unit (BTU), where 1 BTU is defined as exactly 1055.05585262 joules (≈1.05506 kJ). See https://en.wikipedia.org/wiki/British_thermal_unit for details.
BtuPerCubicFootDegreeFahrenheit = 1,
CaloriePerCubicCentimeterDegreeCelsius = 2,
JoulePerCubicMeterDegreeCelsius = 3,
diff --git a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
index ce0f3e87d9..15c28b6604 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
+++ b/UnitsNet.NanoFramework/GeneratedCode/UnitsNet.nanoFramework.sln
@@ -12,10 +12,6 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "AmplitudeRatio", "Amplitude
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Angle", "Angle\Angle.nfproj", "{4b036819-f813-0c4d-3e44-1fcc8b5f3ec7}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ApparentEnergy", "ApparentEnergy\ApparentEnergy.nfproj", "{6f80e841-e953-bc39-6670-8711f2ad9d18}"
-EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ApparentPower", "ApparentPower\ApparentPower.nfproj", "{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Area", "Area\Area.nfproj", "{04c24d02-bad7-a877-ff9b-a36a886c9633}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "AreaDensity", "AreaDensity\AreaDensity.nfproj", "{92ff1332-bf34-943e-a58d-8a76746d879e}"
@@ -26,8 +22,6 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "BitRate", "BitRate\BitRate.
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "BrakeSpecificFuelConsumption", "BrakeSpecificFuelConsumption\BrakeSpecificFuelConsumption.nfproj", "{085145f2-2b8f-4d09-5290-c14cdcd452bf}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Capacitance", "Capacitance\Capacitance.nfproj", "{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "CoefficientOfThermalExpansion", "CoefficientOfThermalExpansion\CoefficientOfThermalExpansion.nfproj", "{a9514ce6-d4e7-88ca-051e-e9e53610c519}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Compressibility", "Compressibility\Compressibility.nfproj", "{daf647be-be87-88b9-ee92-dece21fe0dff}"
@@ -70,12 +64,8 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricInductance", "Elect
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotential", "ElectricPotential\ElectricPotential.nfproj", "{66c94dc2-e546-9737-a45b-4bc60fe0e536}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotentialAc", "ElectricPotentialAc\ElectricPotentialAc.nfproj", "{ab1339ec-f1d8-6abf-093e-1525ee231a9d}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotentialChangeRate", "ElectricPotentialChangeRate\ElectricPotentialChangeRate.nfproj", "{679517ca-9d0b-0ec2-35ae-95230281cfba}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricPotentialDc", "ElectricPotentialDc\ElectricPotentialDc.nfproj", "{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricReactance", "ElectricReactance\ElectricReactance.nfproj", "{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ElectricReactiveEnergy", "ElectricReactiveEnergy\ElectricReactiveEnergy.nfproj", "{9f892c4e-26c2-1420-a73c-08138c8f6ca2}"
@@ -202,10 +192,6 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Ratio", "Ratio\Ratio.nfproj
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "RatioChangeRate", "RatioChangeRate\RatioChangeRate.nfproj", "{c028861d-f9e8-8231-2b6a-bc3b3fba349c}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ReactiveEnergy", "ReactiveEnergy\ReactiveEnergy.nfproj", "{64c918a4-27a8-3e9c-e81f-6917f0edde90}"
-EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ReactivePower", "ReactivePower\ReactivePower.nfproj", "{6821b87e-65eb-bfdb-8fdc-8b183edf739e}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ReciprocalArea", "ReciprocalArea\ReciprocalArea.nfproj", "{30fee563-a3f0-9c50-bfd1-1af707aaf3c4}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ReciprocalLength", "ReciprocalLength\ReciprocalLength.nfproj", "{83d6c79a-c71a-d467-284c-28edbbd059d2}"
@@ -248,12 +234,10 @@ Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "TemperatureGradient", "Temp
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ThermalConductivity", "ThermalConductivity\ThermalConductivity.nfproj", "{7e7d8010-b37a-151a-11a5-1db234ee1104}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ThermalResistance", "ThermalResistance\ThermalResistance.nfproj", "{c69bdd4d-3ebd-4b8e-cffb-650903da3872}"
+Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "ThermalInsulance", "ThermalInsulance\ThermalInsulance.nfproj", "{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Torque", "Torque\Torque.nfproj", "{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}"
EndProject
-Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "TorquePerLength", "TorquePerLength\TorquePerLength.nfproj", "{c27e1919-64f1-ce81-c6d9-b46ced745a12}"
-EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "Turbidity", "Turbidity\Turbidity.nfproj", "{05ac8aed-49a4-5c9f-d8c2-8d2debf64791}"
EndProject
Project("{d608a2b1-6ead-4383-a205-ad1ce69d9ef7}") = "VitaminA", "VitaminA\VitaminA.nfproj", "{c00185af-8735-7674-5fa6-232424b04161}"
@@ -308,18 +292,6 @@ Global
{4b036819-f813-0c4d-3e44-1fcc8b5f3ec7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4b036819-f813-0c4d-3e44-1fcc8b5f3ec7}.Release|Any CPU.Build.0 = Release|Any CPU
{4b036819-f813-0c4d-3e44-1fcc8b5f3ec7}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Release|Any CPU.Build.0 = Release|Any CPU
-{6f80e841-e953-bc39-6670-8711f2ad9d18}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Release|Any CPU.Build.0 = Release|Any CPU
-{88b9a61a-b21b-97cc-ef89-78d1e3ff7767}.Release|Any CPU.Deploy.0 = Release|Any CPU
{04c24d02-bad7-a877-ff9b-a36a886c9633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04c24d02-bad7-a877-ff9b-a36a886c9633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04c24d02-bad7-a877-ff9b-a36a886c9633}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -350,12 +322,6 @@ Global
{085145f2-2b8f-4d09-5290-c14cdcd452bf}.Release|Any CPU.ActiveCfg = Release|Any CPU
{085145f2-2b8f-4d09-5290-c14cdcd452bf}.Release|Any CPU.Build.0 = Release|Any CPU
{085145f2-2b8f-4d09-5290-c14cdcd452bf}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Release|Any CPU.Build.0 = Release|Any CPU
-{c1351fc7-d3d8-c3ce-0715-ad8e18ab8c94}.Release|Any CPU.Deploy.0 = Release|Any CPU
{a9514ce6-d4e7-88ca-051e-e9e53610c519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a9514ce6-d4e7-88ca-051e-e9e53610c519}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a9514ce6-d4e7-88ca-051e-e9e53610c519}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -482,24 +448,12 @@ Global
{66c94dc2-e546-9737-a45b-4bc60fe0e536}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66c94dc2-e546-9737-a45b-4bc60fe0e536}.Release|Any CPU.Build.0 = Release|Any CPU
{66c94dc2-e546-9737-a45b-4bc60fe0e536}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Release|Any CPU.Build.0 = Release|Any CPU
-{ab1339ec-f1d8-6abf-093e-1525ee231a9d}.Release|Any CPU.Deploy.0 = Release|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Debug|Any CPU.Build.0 = Debug|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Release|Any CPU.ActiveCfg = Release|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Release|Any CPU.Build.0 = Release|Any CPU
{679517ca-9d0b-0ec2-35ae-95230281cfba}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.Build.0 = Release|Any CPU
-{27ebf863-3ee7-ddb0-08ab-8577438a8f1c}.Release|Any CPU.Deploy.0 = Release|Any CPU
{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{e3d3c1e3-aaa3-5d40-472e-ae837457cf73}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -878,18 +832,6 @@ Global
{c028861d-f9e8-8231-2b6a-bc3b3fba349c}.Release|Any CPU.ActiveCfg = Release|Any CPU
{c028861d-f9e8-8231-2b6a-bc3b3fba349c}.Release|Any CPU.Build.0 = Release|Any CPU
{c028861d-f9e8-8231-2b6a-bc3b3fba349c}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Release|Any CPU.Build.0 = Release|Any CPU
-{64c918a4-27a8-3e9c-e81f-6917f0edde90}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Release|Any CPU.Build.0 = Release|Any CPU
-{6821b87e-65eb-bfdb-8fdc-8b183edf739e}.Release|Any CPU.Deploy.0 = Release|Any CPU
{30fee563-a3f0-9c50-bfd1-1af707aaf3c4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30fee563-a3f0-9c50-bfd1-1af707aaf3c4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30fee563-a3f0-9c50-bfd1-1af707aaf3c4}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
@@ -1016,24 +958,18 @@ Global
{7e7d8010-b37a-151a-11a5-1db234ee1104}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7e7d8010-b37a-151a-11a5-1db234ee1104}.Release|Any CPU.Build.0 = Release|Any CPU
{7e7d8010-b37a-151a-11a5-1db234ee1104}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Release|Any CPU.Build.0 = Release|Any CPU
-{c69bdd4d-3ebd-4b8e-cffb-650903da3872}.Release|Any CPU.Deploy.0 = Release|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Debug|Any CPU.Build.0 = Debug|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Release|Any CPU.ActiveCfg = Release|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Release|Any CPU.Build.0 = Release|Any CPU
+{0194c08d-ffcd-78bd-9e14-66634fe6d4ea}.Release|Any CPU.Deploy.0 = Release|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Release|Any CPU.Build.0 = Release|Any CPU
{3b6bbc8a-1b22-deff-2980-53b77b6f3e5f}.Release|Any CPU.Deploy.0 = Release|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Debug|Any CPU.Build.0 = Debug|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Release|Any CPU.ActiveCfg = Release|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Release|Any CPU.Build.0 = Release|Any CPU
-{c27e1919-64f1-ce81-c6d9-b46ced745a12}.Release|Any CPU.Deploy.0 = Release|Any CPU
{05ac8aed-49a4-5c9f-d8c2-8d2debf64791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05ac8aed-49a4-5c9f-d8c2-8d2debf64791}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05ac8aed-49a4-5c9f-d8c2-8d2debf64791}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec
index 37c8d6104f..662522d06d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/UnitsNet.NanoFramework.VitaminA.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VitaminA
- 5.74.0
+ 6.0.0-pre014
Units.NET VitaminA - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework vitamina unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/VitaminA.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/VitaminA.nfproj
index 4c0e10d600..8f39d21b69 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/VitaminA.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/VitaminA.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VitaminA/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VitaminA/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec b/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec
index c32339cd4f..df7836cf39 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/Volume/UnitsNet.NanoFramework.Volume.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.Volume
- 5.74.0
+ 6.0.0-pre014
Units.NET Volume - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volume unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Volume/Volume.nfproj b/UnitsNet.NanoFramework/GeneratedCode/Volume/Volume.nfproj
index fd7e690df6..cd8795c28d 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Volume/Volume.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/Volume/Volume.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/Volume/packages.config b/UnitsNet.NanoFramework/GeneratedCode/Volume/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/Volume/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/Volume/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec
index 5d45b35d40..4afd8c2baa 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/UnitsNet.NanoFramework.VolumeConcentration.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VolumeConcentration
- 5.74.0
+ 6.0.0-pre014
Units.NET VolumeConcentration - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volumeconcentration unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/VolumeConcentration.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/VolumeConcentration.nfproj
index 59f2b13817..139a354e79 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/VolumeConcentration.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/VolumeConcentration.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeConcentration/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec
index 117d75fcdb..8f40ecbb70 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/UnitsNet.NanoFramework.VolumeFlow.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VolumeFlow
- 5.74.0
+ 6.0.0-pre014
Units.NET VolumeFlow - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volumeflow unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/VolumeFlow.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/VolumeFlow.nfproj
index e929e999c2..7cd2632f91 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/VolumeFlow.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/VolumeFlow.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlow/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec
index 12106831d3..2a168e3fb3 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/UnitsNet.NanoFramework.VolumeFlowPerArea.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VolumeFlowPerArea
- 5.74.0
+ 6.0.0-pre014
Units.NET VolumeFlowPerArea - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volumeflowperarea unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/VolumeFlowPerArea.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/VolumeFlowPerArea.nfproj
index a80ed83122..a4e3b0f655 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/VolumeFlowPerArea.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/VolumeFlowPerArea.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumeFlowPerArea/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec
index 15108cd076..511881f134 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/UnitsNet.NanoFramework.VolumePerLength.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VolumePerLength
- 5.74.0
+ 6.0.0-pre014
Units.NET VolumePerLength - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volumeperlength unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/VolumePerLength.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/VolumePerLength.nfproj
index 0132640dbc..033ae1dcf0 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/VolumePerLength.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/VolumePerLength.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumePerLength/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec
index e955768d62..def2a9a784 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/UnitsNet.NanoFramework.VolumetricHeatCapacity.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.VolumetricHeatCapacity
- 5.74.0
+ 6.0.0-pre014
Units.NET VolumetricHeatCapacity - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,7 +17,7 @@
en-US
nanoframework volumetricheatcapacity unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/VolumetricHeatCapacity.nfproj b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/VolumetricHeatCapacity.nfproj
index bd7b176076..fdacea6cf9 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/VolumetricHeatCapacity.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/VolumetricHeatCapacity.nfproj
@@ -24,8 +24,8 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/packages.config b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/packages.config
index b7286a971f..313a8dccdf 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/VolumetricHeatCapacity/packages.config
@@ -1,4 +1,4 @@
-
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec
index 11ee7298e2..7435a576e1 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec
+++ b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/UnitsNet.NanoFramework.WarpingMomentOfInertia.nuspec
@@ -2,7 +2,7 @@
UnitsNet.nanoFramework.WarpingMomentOfInertia
- 5.74.0
+ 6.0.0-pre014
Units.NET WarpingMomentOfInertia - nanoFramework
Andreas Gullberg Larsen,nanoframework
UnitsNet
@@ -17,8 +17,8 @@
en-US
nanoframework warpingmomentofinertia unit units quantity quantities measurement si metric imperial abbreviation abbreviations convert conversion parse immutable
-
-
+
+
diff --git a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/WarpingMomentOfInertia.nfproj b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/WarpingMomentOfInertia.nfproj
index bc18b8d3a0..f3b390a93b 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/WarpingMomentOfInertia.nfproj
+++ b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/WarpingMomentOfInertia.nfproj
@@ -24,13 +24,13 @@
-
- ..\packages\nanoFramework.CoreLibrary.1.17.11\lib\mscorlib.dll
+
+ ..\packages\nanoFramework.CoreLibrary.1.15.5\lib\mscorlib.dll
True
True
-
- ..\packages\nanoFramework.System.Math.1.5.116\lib\System.Math.dll
+
+ ..\packages\nanoFramework.System.Math.1.5.43\lib\System.Math.dll
True
True
diff --git a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/packages.config b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/packages.config
index 53c5907746..ac11548cd6 100644
--- a/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/packages.config
+++ b/UnitsNet.NanoFramework/GeneratedCode/WarpingMomentOfInertia/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToAngleExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToAngleExtensionsTest.g.cs
index fde6a5c8bc..504790b023 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToAngleExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToAngleExtensionsTest.g.cs
@@ -84,9 +84,5 @@ public void NumberToRadiansTest() =>
public void NumberToRevolutionsTest() =>
Assert.Equal(Angle.FromRevolutions(2), 2.Revolutions());
- [Fact]
- public void NumberToTiltTest() =>
- Assert.Equal(Angle.FromTilt(2), 2.Tilt());
-
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentEnergyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentEnergyExtensionsTest.g.cs
deleted file mode 100644
index 8e43023662..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentEnergyExtensionsTest.g.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToApparentEnergy;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToApparentEnergyExtensionsTests
- {
- [Fact]
- public void NumberToKilovoltampereHoursTest() =>
- Assert.Equal(ApparentEnergy.FromKilovoltampereHours(2), 2.KilovoltampereHours());
-
- [Fact]
- public void NumberToMegavoltampereHoursTest() =>
- Assert.Equal(ApparentEnergy.FromMegavoltampereHours(2), 2.MegavoltampereHours());
-
- [Fact]
- public void NumberToVoltampereHoursTest() =>
- Assert.Equal(ApparentEnergy.FromVoltampereHours(2), 2.VoltampereHours());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentPowerExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentPowerExtensionsTest.g.cs
deleted file mode 100644
index a4ba14f43e..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToApparentPowerExtensionsTest.g.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToApparentPower;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToApparentPowerExtensionsTests
- {
- [Fact]
- public void NumberToGigavoltamperesTest() =>
- Assert.Equal(ApparentPower.FromGigavoltamperes(2), 2.Gigavoltamperes());
-
- [Fact]
- public void NumberToKilovoltamperesTest() =>
- Assert.Equal(ApparentPower.FromKilovoltamperes(2), 2.Kilovoltamperes());
-
- [Fact]
- public void NumberToMegavoltamperesTest() =>
- Assert.Equal(ApparentPower.FromMegavoltamperes(2), 2.Megavoltamperes());
-
- [Fact]
- public void NumberToMicrovoltamperesTest() =>
- Assert.Equal(ApparentPower.FromMicrovoltamperes(2), 2.Microvoltamperes());
-
- [Fact]
- public void NumberToMillivoltamperesTest() =>
- Assert.Equal(ApparentPower.FromMillivoltamperes(2), 2.Millivoltamperes());
-
- [Fact]
- public void NumberToVoltamperesTest() =>
- Assert.Equal(ApparentPower.FromVoltamperes(2), 2.Voltamperes());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCapacitanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCapacitanceExtensionsTest.g.cs
deleted file mode 100644
index 7e969d6f38..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCapacitanceExtensionsTest.g.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToCapacitance;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToCapacitanceExtensionsTests
- {
- [Fact]
- public void NumberToFaradsTest() =>
- Assert.Equal(Capacitance.FromFarads(2), 2.Farads());
-
- [Fact]
- public void NumberToKilofaradsTest() =>
- Assert.Equal(Capacitance.FromKilofarads(2), 2.Kilofarads());
-
- [Fact]
- public void NumberToMegafaradsTest() =>
- Assert.Equal(Capacitance.FromMegafarads(2), 2.Megafarads());
-
- [Fact]
- public void NumberToMicrofaradsTest() =>
- Assert.Equal(Capacitance.FromMicrofarads(2), 2.Microfarads());
-
- [Fact]
- public void NumberToMillifaradsTest() =>
- Assert.Equal(Capacitance.FromMillifarads(2), 2.Millifarads());
-
- [Fact]
- public void NumberToNanofaradsTest() =>
- Assert.Equal(Capacitance.FromNanofarads(2), 2.Nanofarads());
-
- [Fact]
- public void NumberToPicofaradsTest() =>
- Assert.Equal(Capacitance.FromPicofarads(2), 2.Picofarads());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensionsTest.g.cs
index 880508b3ee..fa8854e062 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToCoefficientOfThermalExpansionExtensionsTest.g.cs
@@ -24,18 +24,6 @@ namespace UnitsNet.Tests
{
public class NumberToCoefficientOfThermalExpansionExtensionsTests
{
- [Fact]
- public void NumberToInverseDegreeCelsiusTest() =>
- Assert.Equal(CoefficientOfThermalExpansion.FromInverseDegreeCelsius(2), 2.InverseDegreeCelsius());
-
- [Fact]
- public void NumberToInverseDegreeFahrenheitTest() =>
- Assert.Equal(CoefficientOfThermalExpansion.FromInverseDegreeFahrenheit(2), 2.InverseDegreeFahrenheit());
-
- [Fact]
- public void NumberToInverseKelvinTest() =>
- Assert.Equal(CoefficientOfThermalExpansion.FromInverseKelvin(2), 2.InverseKelvin());
-
[Fact]
public void NumberToPerDegreeCelsiusTest() =>
Assert.Equal(CoefficientOfThermalExpansion.FromPerDegreeCelsius(2), 2.PerDegreeCelsius());
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToDensityExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToDensityExtensionsTest.g.cs
index f61c2cf329..4df840f2f8 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToDensityExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToDensityExtensionsTest.g.cs
@@ -25,8 +25,8 @@ namespace UnitsNet.Tests
public class NumberToDensityExtensionsTests
{
[Fact]
- public void NumberToCentigramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromCentigramsPerDeciLiter(2), 2.CentigramsPerDeciLiter());
+ public void NumberToCentigramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromCentigramsPerDeciliter(2), 2.CentigramsPerDeciliter());
[Fact]
public void NumberToCentigramsPerLiterTest() =>
@@ -37,8 +37,8 @@ public void NumberToCentigramsPerMilliliterTest() =>
Assert.Equal(Density.FromCentigramsPerMilliliter(2), 2.CentigramsPerMilliliter());
[Fact]
- public void NumberToDecigramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromDecigramsPerDeciLiter(2), 2.DecigramsPerDeciLiter());
+ public void NumberToDecigramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromDecigramsPerDeciliter(2), 2.DecigramsPerDeciliter());
[Fact]
public void NumberToDecigramsPerLiterTest() =>
@@ -49,8 +49,8 @@ public void NumberToDecigramsPerMilliliterTest() =>
Assert.Equal(Density.FromDecigramsPerMilliliter(2), 2.DecigramsPerMilliliter());
[Fact]
- public void NumberToFemtogramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromFemtogramsPerDeciLiter(2), 2.FemtogramsPerDeciLiter());
+ public void NumberToFemtogramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromFemtogramsPerDeciliter(2), 2.FemtogramsPerDeciliter());
[Fact]
public void NumberToFemtogramsPerLiterTest() =>
@@ -81,8 +81,8 @@ public void NumberToGramsPerCubicMillimeterTest() =>
Assert.Equal(Density.FromGramsPerCubicMillimeter(2), 2.GramsPerCubicMillimeter());
[Fact]
- public void NumberToGramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromGramsPerDeciLiter(2), 2.GramsPerDeciLiter());
+ public void NumberToGramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromGramsPerDeciliter(2), 2.GramsPerDeciliter());
[Fact]
public void NumberToGramsPerLiterTest() =>
@@ -125,8 +125,8 @@ public void NumberToMicrogramsPerCubicMeterTest() =>
Assert.Equal(Density.FromMicrogramsPerCubicMeter(2), 2.MicrogramsPerCubicMeter());
[Fact]
- public void NumberToMicrogramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromMicrogramsPerDeciLiter(2), 2.MicrogramsPerDeciLiter());
+ public void NumberToMicrogramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromMicrogramsPerDeciliter(2), 2.MicrogramsPerDeciliter());
[Fact]
public void NumberToMicrogramsPerLiterTest() =>
@@ -141,8 +141,8 @@ public void NumberToMilligramsPerCubicMeterTest() =>
Assert.Equal(Density.FromMilligramsPerCubicMeter(2), 2.MilligramsPerCubicMeter());
[Fact]
- public void NumberToMilligramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromMilligramsPerDeciLiter(2), 2.MilligramsPerDeciLiter());
+ public void NumberToMilligramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromMilligramsPerDeciliter(2), 2.MilligramsPerDeciliter());
[Fact]
public void NumberToMilligramsPerLiterTest() =>
@@ -153,8 +153,8 @@ public void NumberToMilligramsPerMilliliterTest() =>
Assert.Equal(Density.FromMilligramsPerMilliliter(2), 2.MilligramsPerMilliliter());
[Fact]
- public void NumberToNanogramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromNanogramsPerDeciLiter(2), 2.NanogramsPerDeciLiter());
+ public void NumberToNanogramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromNanogramsPerDeciliter(2), 2.NanogramsPerDeciliter());
[Fact]
public void NumberToNanogramsPerLiterTest() =>
@@ -165,8 +165,8 @@ public void NumberToNanogramsPerMilliliterTest() =>
Assert.Equal(Density.FromNanogramsPerMilliliter(2), 2.NanogramsPerMilliliter());
[Fact]
- public void NumberToPicogramsPerDeciLiterTest() =>
- Assert.Equal(Density.FromPicogramsPerDeciLiter(2), 2.PicogramsPerDeciLiter());
+ public void NumberToPicogramsPerDeciliterTest() =>
+ Assert.Equal(Density.FromPicogramsPerDeciliter(2), 2.PicogramsPerDeciliter());
[Fact]
public void NumberToPicogramsPerLiterTest() =>
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialAcExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialAcExtensionsTest.g.cs
deleted file mode 100644
index 3943cee481..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialAcExtensionsTest.g.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToElectricPotentialAc;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToElectricPotentialAcExtensionsTests
- {
- [Fact]
- public void NumberToKilovoltsAcTest() =>
- Assert.Equal(ElectricPotentialAc.FromKilovoltsAc(2), 2.KilovoltsAc());
-
- [Fact]
- public void NumberToMegavoltsAcTest() =>
- Assert.Equal(ElectricPotentialAc.FromMegavoltsAc(2), 2.MegavoltsAc());
-
- [Fact]
- public void NumberToMicrovoltsAcTest() =>
- Assert.Equal(ElectricPotentialAc.FromMicrovoltsAc(2), 2.MicrovoltsAc());
-
- [Fact]
- public void NumberToMillivoltsAcTest() =>
- Assert.Equal(ElectricPotentialAc.FromMillivoltsAc(2), 2.MillivoltsAc());
-
- [Fact]
- public void NumberToVoltsAcTest() =>
- Assert.Equal(ElectricPotentialAc.FromVoltsAc(2), 2.VoltsAc());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialChangeRateExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialChangeRateExtensionsTest.g.cs
index da8acffcc6..dda5ae8b63 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialChangeRateExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialChangeRateExtensionsTest.g.cs
@@ -25,84 +25,84 @@ namespace UnitsNet.Tests
public class NumberToElectricPotentialChangeRateExtensionsTests
{
[Fact]
- public void NumberToKilovoltsPerHoursTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerHours(2), 2.KilovoltsPerHours());
+ public void NumberToKilovoltsPerHourTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerHour(2), 2.KilovoltsPerHour());
[Fact]
- public void NumberToKilovoltsPerMicrosecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerMicroseconds(2), 2.KilovoltsPerMicroseconds());
+ public void NumberToKilovoltsPerMicrosecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerMicrosecond(2), 2.KilovoltsPerMicrosecond());
[Fact]
- public void NumberToKilovoltsPerMinutesTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerMinutes(2), 2.KilovoltsPerMinutes());
+ public void NumberToKilovoltsPerMinuteTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerMinute(2), 2.KilovoltsPerMinute());
[Fact]
- public void NumberToKilovoltsPerSecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerSeconds(2), 2.KilovoltsPerSeconds());
+ public void NumberToKilovoltsPerSecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromKilovoltsPerSecond(2), 2.KilovoltsPerSecond());
[Fact]
- public void NumberToMegavoltsPerHoursTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerHours(2), 2.MegavoltsPerHours());
+ public void NumberToMegavoltsPerHourTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerHour(2), 2.MegavoltsPerHour());
[Fact]
- public void NumberToMegavoltsPerMicrosecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerMicroseconds(2), 2.MegavoltsPerMicroseconds());
+ public void NumberToMegavoltsPerMicrosecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerMicrosecond(2), 2.MegavoltsPerMicrosecond());
[Fact]
- public void NumberToMegavoltsPerMinutesTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerMinutes(2), 2.MegavoltsPerMinutes());
+ public void NumberToMegavoltsPerMinuteTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerMinute(2), 2.MegavoltsPerMinute());
[Fact]
- public void NumberToMegavoltsPerSecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerSeconds(2), 2.MegavoltsPerSeconds());
+ public void NumberToMegavoltsPerSecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMegavoltsPerSecond(2), 2.MegavoltsPerSecond());
[Fact]
- public void NumberToMicrovoltsPerHoursTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerHours(2), 2.MicrovoltsPerHours());
+ public void NumberToMicrovoltsPerHourTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerHour(2), 2.MicrovoltsPerHour());
[Fact]
- public void NumberToMicrovoltsPerMicrosecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerMicroseconds(2), 2.MicrovoltsPerMicroseconds());
+ public void NumberToMicrovoltsPerMicrosecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerMicrosecond(2), 2.MicrovoltsPerMicrosecond());
[Fact]
- public void NumberToMicrovoltsPerMinutesTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerMinutes(2), 2.MicrovoltsPerMinutes());
+ public void NumberToMicrovoltsPerMinuteTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerMinute(2), 2.MicrovoltsPerMinute());
[Fact]
- public void NumberToMicrovoltsPerSecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerSeconds(2), 2.MicrovoltsPerSeconds());
+ public void NumberToMicrovoltsPerSecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMicrovoltsPerSecond(2), 2.MicrovoltsPerSecond());
[Fact]
- public void NumberToMillivoltsPerHoursTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerHours(2), 2.MillivoltsPerHours());
+ public void NumberToMillivoltsPerHourTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerHour(2), 2.MillivoltsPerHour());
[Fact]
- public void NumberToMillivoltsPerMicrosecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerMicroseconds(2), 2.MillivoltsPerMicroseconds());
+ public void NumberToMillivoltsPerMicrosecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerMicrosecond(2), 2.MillivoltsPerMicrosecond());
[Fact]
- public void NumberToMillivoltsPerMinutesTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerMinutes(2), 2.MillivoltsPerMinutes());
+ public void NumberToMillivoltsPerMinuteTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerMinute(2), 2.MillivoltsPerMinute());
[Fact]
- public void NumberToMillivoltsPerSecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerSeconds(2), 2.MillivoltsPerSeconds());
+ public void NumberToMillivoltsPerSecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromMillivoltsPerSecond(2), 2.MillivoltsPerSecond());
[Fact]
- public void NumberToVoltsPerHoursTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerHours(2), 2.VoltsPerHours());
+ public void NumberToVoltsPerHourTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerHour(2), 2.VoltsPerHour());
[Fact]
- public void NumberToVoltsPerMicrosecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerMicroseconds(2), 2.VoltsPerMicroseconds());
+ public void NumberToVoltsPerMicrosecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerMicrosecond(2), 2.VoltsPerMicrosecond());
[Fact]
- public void NumberToVoltsPerMinutesTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerMinutes(2), 2.VoltsPerMinutes());
+ public void NumberToVoltsPerMinuteTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerMinute(2), 2.VoltsPerMinute());
[Fact]
- public void NumberToVoltsPerSecondsTest() =>
- Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerSeconds(2), 2.VoltsPerSeconds());
+ public void NumberToVoltsPerSecondTest() =>
+ Assert.Equal(ElectricPotentialChangeRate.FromVoltsPerSecond(2), 2.VoltsPerSecond());
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialDcExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialDcExtensionsTest.g.cs
deleted file mode 100644
index 479460c6a9..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToElectricPotentialDcExtensionsTest.g.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToElectricPotentialDc;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToElectricPotentialDcExtensionsTests
- {
- [Fact]
- public void NumberToKilovoltsDcTest() =>
- Assert.Equal(ElectricPotentialDc.FromKilovoltsDc(2), 2.KilovoltsDc());
-
- [Fact]
- public void NumberToMegavoltsDcTest() =>
- Assert.Equal(ElectricPotentialDc.FromMegavoltsDc(2), 2.MegavoltsDc());
-
- [Fact]
- public void NumberToMicrovoltsDcTest() =>
- Assert.Equal(ElectricPotentialDc.FromMicrovoltsDc(2), 2.MicrovoltsDc());
-
- [Fact]
- public void NumberToMillivoltsDcTest() =>
- Assert.Equal(ElectricPotentialDc.FromMillivoltsDc(2), 2.MillivoltsDc());
-
- [Fact]
- public void NumberToVoltsDcTest() =>
- Assert.Equal(ElectricPotentialDc.FromVoltsDc(2), 2.VoltsDc());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFrequencyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFrequencyExtensionsTest.g.cs
index f7828567d9..2d5937266a 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFrequencyExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFrequencyExtensionsTest.g.cs
@@ -28,10 +28,6 @@ public class NumberToFrequencyExtensionsTests
public void NumberToBeatsPerMinuteTest() =>
Assert.Equal(Frequency.FromBeatsPerMinute(2), 2.BeatsPerMinute());
- [Fact]
- public void NumberToBUnitsTest() =>
- Assert.Equal(Frequency.FromBUnits(2), 2.BUnits());
-
[Fact]
public void NumberToCyclesPerHourTest() =>
Assert.Equal(Frequency.FromCyclesPerHour(2), 2.CyclesPerHour());
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFuelEfficiencyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFuelEfficiencyExtensionsTest.g.cs
index 1a82f80799..c721dbcb09 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFuelEfficiencyExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToFuelEfficiencyExtensionsTest.g.cs
@@ -25,8 +25,8 @@ namespace UnitsNet.Tests
public class NumberToFuelEfficiencyExtensionsTests
{
[Fact]
- public void NumberToKilometersPerLitersTest() =>
- Assert.Equal(FuelEfficiency.FromKilometersPerLiters(2), 2.KilometersPerLiters());
+ public void NumberToKilometersPerLiterTest() =>
+ Assert.Equal(FuelEfficiency.FromKilometersPerLiter(2), 2.KilometersPerLiter());
[Fact]
public void NumberToLitersPer100KilometersTest() =>
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToHeatTransferCoefficientExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToHeatTransferCoefficientExtensionsTest.g.cs
index 9f317e64d2..fb4878717d 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToHeatTransferCoefficientExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToHeatTransferCoefficientExtensionsTest.g.cs
@@ -28,10 +28,6 @@ public class NumberToHeatTransferCoefficientExtensionsTests
public void NumberToBtusPerHourSquareFootDegreeFahrenheitTest() =>
Assert.Equal(HeatTransferCoefficient.FromBtusPerHourSquareFootDegreeFahrenheit(2), 2.BtusPerHourSquareFootDegreeFahrenheit());
- [Fact]
- public void NumberToBtusPerSquareFootDegreeFahrenheitTest() =>
- Assert.Equal(HeatTransferCoefficient.FromBtusPerSquareFootDegreeFahrenheit(2), 2.BtusPerSquareFootDegreeFahrenheit());
-
[Fact]
public void NumberToCaloriesPerHourSquareMeterDegreeCelsiusTest() =>
Assert.Equal(HeatTransferCoefficient.FromCaloriesPerHourSquareMeterDegreeCelsius(2), 2.CaloriesPerHourSquareMeterDegreeCelsius());
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToMassMomentOfInertiaExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToMassMomentOfInertiaExtensionsTest.g.cs
index 6f4a73a26e..c279f3e3c4 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToMassMomentOfInertiaExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToMassMomentOfInertiaExtensionsTest.g.cs
@@ -69,8 +69,8 @@ public void NumberToKilotonneSquareMetersTest() =>
Assert.Equal(MassMomentOfInertia.FromKilotonneSquareMeters(2), 2.KilotonneSquareMeters());
[Fact]
- public void NumberToKilotonneSquareMilimetersTest() =>
- Assert.Equal(MassMomentOfInertia.FromKilotonneSquareMilimeters(2), 2.KilotonneSquareMilimeters());
+ public void NumberToKilotonneSquareMillimetersTest() =>
+ Assert.Equal(MassMomentOfInertia.FromKilotonneSquareMillimeters(2), 2.KilotonneSquareMillimeters());
[Fact]
public void NumberToMegatonneSquareCentimetersTest() =>
@@ -85,8 +85,8 @@ public void NumberToMegatonneSquareMetersTest() =>
Assert.Equal(MassMomentOfInertia.FromMegatonneSquareMeters(2), 2.MegatonneSquareMeters());
[Fact]
- public void NumberToMegatonneSquareMilimetersTest() =>
- Assert.Equal(MassMomentOfInertia.FromMegatonneSquareMilimeters(2), 2.MegatonneSquareMilimeters());
+ public void NumberToMegatonneSquareMillimetersTest() =>
+ Assert.Equal(MassMomentOfInertia.FromMegatonneSquareMillimeters(2), 2.MegatonneSquareMillimeters());
[Fact]
public void NumberToMilligramSquareCentimetersTest() =>
@@ -133,8 +133,8 @@ public void NumberToTonneSquareMetersTest() =>
Assert.Equal(MassMomentOfInertia.FromTonneSquareMeters(2), 2.TonneSquareMeters());
[Fact]
- public void NumberToTonneSquareMilimetersTest() =>
- Assert.Equal(MassMomentOfInertia.FromTonneSquareMilimeters(2), 2.TonneSquareMilimeters());
+ public void NumberToTonneSquareMillimetersTest() =>
+ Assert.Equal(MassMomentOfInertia.FromTonneSquareMillimeters(2), 2.TonneSquareMillimeters());
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureExtensionsTest.g.cs
index 47e283e983..8dd59fa16d 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureExtensionsTest.g.cs
@@ -52,10 +52,6 @@ public void NumberToDecibarsTest() =>
public void NumberToDynesPerSquareCentimeterTest() =>
Assert.Equal(Pressure.FromDynesPerSquareCentimeter(2), 2.DynesPerSquareCentimeter());
- [Fact]
- public void NumberToFeetOfElevationTest() =>
- Assert.Equal(Pressure.FromFeetOfElevation(2), 2.FeetOfElevation());
-
[Fact]
public void NumberToFeetOfHeadTest() =>
Assert.Equal(Pressure.FromFeetOfHead(2), 2.FeetOfHead());
@@ -132,10 +128,6 @@ public void NumberToMeganewtonsPerSquareMeterTest() =>
public void NumberToMegapascalsTest() =>
Assert.Equal(Pressure.FromMegapascals(2), 2.Megapascals());
- [Fact]
- public void NumberToMetersOfElevationTest() =>
- Assert.Equal(Pressure.FromMetersOfElevation(2), 2.MetersOfElevation());
-
[Fact]
public void NumberToMetersOfHeadTest() =>
Assert.Equal(Pressure.FromMetersOfHead(2), 2.MetersOfHead());
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactiveEnergyExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactiveEnergyExtensionsTest.g.cs
deleted file mode 100644
index e55046a8a2..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactiveEnergyExtensionsTest.g.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToReactiveEnergy;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToReactiveEnergyExtensionsTests
- {
- [Fact]
- public void NumberToKilovoltampereReactiveHoursTest() =>
- Assert.Equal(ReactiveEnergy.FromKilovoltampereReactiveHours(2), 2.KilovoltampereReactiveHours());
-
- [Fact]
- public void NumberToMegavoltampereReactiveHoursTest() =>
- Assert.Equal(ReactiveEnergy.FromMegavoltampereReactiveHours(2), 2.MegavoltampereReactiveHours());
-
- [Fact]
- public void NumberToVoltampereReactiveHoursTest() =>
- Assert.Equal(ReactiveEnergy.FromVoltampereReactiveHours(2), 2.VoltampereReactiveHours());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactivePowerExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactivePowerExtensionsTest.g.cs
deleted file mode 100644
index 4c4d9a8b4b..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToReactivePowerExtensionsTest.g.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToReactivePower;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToReactivePowerExtensionsTests
- {
- [Fact]
- public void NumberToGigavoltamperesReactiveTest() =>
- Assert.Equal(ReactivePower.FromGigavoltamperesReactive(2), 2.GigavoltamperesReactive());
-
- [Fact]
- public void NumberToKilovoltamperesReactiveTest() =>
- Assert.Equal(ReactivePower.FromKilovoltamperesReactive(2), 2.KilovoltamperesReactive());
-
- [Fact]
- public void NumberToMegavoltamperesReactiveTest() =>
- Assert.Equal(ReactivePower.FromMegavoltamperesReactive(2), 2.MegavoltamperesReactive());
-
- [Fact]
- public void NumberToVoltamperesReactiveTest() =>
- Assert.Equal(ReactivePower.FromVoltamperesReactive(2), 2.VoltamperesReactive());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpecificFuelConsumptionExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpecificFuelConsumptionExtensionsTest.g.cs
index 4129c6055c..836d851957 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpecificFuelConsumptionExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpecificFuelConsumptionExtensionsTest.g.cs
@@ -25,16 +25,16 @@ namespace UnitsNet.Tests
public class NumberToSpecificFuelConsumptionExtensionsTests
{
[Fact]
- public void NumberToGramsPerKiloNewtonSecondTest() =>
- Assert.Equal(SpecificFuelConsumption.FromGramsPerKiloNewtonSecond(2), 2.GramsPerKiloNewtonSecond());
+ public void NumberToGramsPerKilonewtonSecondTest() =>
+ Assert.Equal(SpecificFuelConsumption.FromGramsPerKilonewtonSecond(2), 2.GramsPerKilonewtonSecond());
[Fact]
public void NumberToKilogramsPerKilogramForceHourTest() =>
Assert.Equal(SpecificFuelConsumption.FromKilogramsPerKilogramForceHour(2), 2.KilogramsPerKilogramForceHour());
[Fact]
- public void NumberToKilogramsPerKiloNewtonSecondTest() =>
- Assert.Equal(SpecificFuelConsumption.FromKilogramsPerKiloNewtonSecond(2), 2.KilogramsPerKiloNewtonSecond());
+ public void NumberToKilogramsPerKilonewtonSecondTest() =>
+ Assert.Equal(SpecificFuelConsumption.FromKilogramsPerKilonewtonSecond(2), 2.KilogramsPerKilonewtonSecond());
[Fact]
public void NumberToPoundsMassPerPoundForceHourTest() =>
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpeedExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpeedExtensionsTest.g.cs
index 7ce9151a80..770b924b14 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpeedExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToSpeedExtensionsTest.g.cs
@@ -29,16 +29,16 @@ public void NumberToCentimetersPerHourTest() =>
Assert.Equal(Speed.FromCentimetersPerHour(2), 2.CentimetersPerHour());
[Fact]
- public void NumberToCentimetersPerMinutesTest() =>
- Assert.Equal(Speed.FromCentimetersPerMinutes(2), 2.CentimetersPerMinutes());
+ public void NumberToCentimetersPerMinuteTest() =>
+ Assert.Equal(Speed.FromCentimetersPerMinute(2), 2.CentimetersPerMinute());
[Fact]
public void NumberToCentimetersPerSecondTest() =>
Assert.Equal(Speed.FromCentimetersPerSecond(2), 2.CentimetersPerSecond());
[Fact]
- public void NumberToDecimetersPerMinutesTest() =>
- Assert.Equal(Speed.FromDecimetersPerMinutes(2), 2.DecimetersPerMinutes());
+ public void NumberToDecimetersPerMinuteTest() =>
+ Assert.Equal(Speed.FromDecimetersPerMinute(2), 2.DecimetersPerMinute());
[Fact]
public void NumberToDecimetersPerSecondTest() =>
@@ -73,8 +73,8 @@ public void NumberToKilometersPerHourTest() =>
Assert.Equal(Speed.FromKilometersPerHour(2), 2.KilometersPerHour());
[Fact]
- public void NumberToKilometersPerMinutesTest() =>
- Assert.Equal(Speed.FromKilometersPerMinutes(2), 2.KilometersPerMinutes());
+ public void NumberToKilometersPerMinuteTest() =>
+ Assert.Equal(Speed.FromKilometersPerMinute(2), 2.KilometersPerMinute());
[Fact]
public void NumberToKilometersPerSecondTest() =>
@@ -93,16 +93,16 @@ public void NumberToMetersPerHourTest() =>
Assert.Equal(Speed.FromMetersPerHour(2), 2.MetersPerHour());
[Fact]
- public void NumberToMetersPerMinutesTest() =>
- Assert.Equal(Speed.FromMetersPerMinutes(2), 2.MetersPerMinutes());
+ public void NumberToMetersPerMinuteTest() =>
+ Assert.Equal(Speed.FromMetersPerMinute(2), 2.MetersPerMinute());
[Fact]
public void NumberToMetersPerSecondTest() =>
Assert.Equal(Speed.FromMetersPerSecond(2), 2.MetersPerSecond());
[Fact]
- public void NumberToMicrometersPerMinutesTest() =>
- Assert.Equal(Speed.FromMicrometersPerMinutes(2), 2.MicrometersPerMinutes());
+ public void NumberToMicrometersPerMinuteTest() =>
+ Assert.Equal(Speed.FromMicrometersPerMinute(2), 2.MicrometersPerMinute());
[Fact]
public void NumberToMicrometersPerSecondTest() =>
@@ -117,16 +117,16 @@ public void NumberToMillimetersPerHourTest() =>
Assert.Equal(Speed.FromMillimetersPerHour(2), 2.MillimetersPerHour());
[Fact]
- public void NumberToMillimetersPerMinutesTest() =>
- Assert.Equal(Speed.FromMillimetersPerMinutes(2), 2.MillimetersPerMinutes());
+ public void NumberToMillimetersPerMinuteTest() =>
+ Assert.Equal(Speed.FromMillimetersPerMinute(2), 2.MillimetersPerMinute());
[Fact]
public void NumberToMillimetersPerSecondTest() =>
Assert.Equal(Speed.FromMillimetersPerSecond(2), 2.MillimetersPerSecond());
[Fact]
- public void NumberToNanometersPerMinutesTest() =>
- Assert.Equal(Speed.FromNanometersPerMinutes(2), 2.NanometersPerMinutes());
+ public void NumberToNanometersPerMinuteTest() =>
+ Assert.Equal(Speed.FromNanometersPerMinute(2), 2.NanometersPerMinute());
[Fact]
public void NumberToNanometersPerSecondTest() =>
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTemperatureGradientExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTemperatureGradientExtensionsTest.g.cs
index 4062ea3754..ae4c204e70 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTemperatureGradientExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTemperatureGradientExtensionsTest.g.cs
@@ -25,12 +25,12 @@ namespace UnitsNet.Tests
public class NumberToTemperatureGradientExtensionsTests
{
[Fact]
- public void NumberToDegreesCelciusPerKilometerTest() =>
- Assert.Equal(TemperatureGradient.FromDegreesCelciusPerKilometer(2), 2.DegreesCelciusPerKilometer());
+ public void NumberToDegreesCelsiusPerKilometerTest() =>
+ Assert.Equal(TemperatureGradient.FromDegreesCelsiusPerKilometer(2), 2.DegreesCelsiusPerKilometer());
[Fact]
- public void NumberToDegreesCelciusPerMeterTest() =>
- Assert.Equal(TemperatureGradient.FromDegreesCelciusPerMeter(2), 2.DegreesCelciusPerMeter());
+ public void NumberToDegreesCelsiusPerMeterTest() =>
+ Assert.Equal(TemperatureGradient.FromDegreesCelsiusPerMeter(2), 2.DegreesCelsiusPerMeter());
[Fact]
public void NumberToDegreesFahrenheitPerFootTest() =>
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalResistanceExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalInsulanceExtensionsTest.g.cs
similarity index 64%
rename from UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalResistanceExtensionsTest.g.cs
rename to UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalInsulanceExtensionsTest.g.cs
index 5728a465b0..a2ab043184 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalResistanceExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToThermalInsulanceExtensionsTest.g.cs
@@ -17,36 +17,36 @@
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-using UnitsNet.NumberExtensions.NumberToThermalResistance;
+using UnitsNet.NumberExtensions.NumberToThermalInsulance;
using Xunit;
namespace UnitsNet.Tests
{
- public class NumberToThermalResistanceExtensionsTests
+ public class NumberToThermalInsulanceExtensionsTests
{
[Fact]
public void NumberToHourSquareFeetDegreesFahrenheitPerBtuTest() =>
- Assert.Equal(ThermalResistance.FromHourSquareFeetDegreesFahrenheitPerBtu(2), 2.HourSquareFeetDegreesFahrenheitPerBtu());
+ Assert.Equal(ThermalInsulance.FromHourSquareFeetDegreesFahrenheitPerBtu(2), 2.HourSquareFeetDegreesFahrenheitPerBtu());
[Fact]
public void NumberToSquareCentimeterHourDegreesCelsiusPerKilocalorieTest() =>
- Assert.Equal(ThermalResistance.FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(2), 2.SquareCentimeterHourDegreesCelsiusPerKilocalorie());
+ Assert.Equal(ThermalInsulance.FromSquareCentimeterHourDegreesCelsiusPerKilocalorie(2), 2.SquareCentimeterHourDegreesCelsiusPerKilocalorie());
[Fact]
public void NumberToSquareCentimeterKelvinsPerWattTest() =>
- Assert.Equal(ThermalResistance.FromSquareCentimeterKelvinsPerWatt(2), 2.SquareCentimeterKelvinsPerWatt());
+ Assert.Equal(ThermalInsulance.FromSquareCentimeterKelvinsPerWatt(2), 2.SquareCentimeterKelvinsPerWatt());
[Fact]
public void NumberToSquareMeterDegreesCelsiusPerWattTest() =>
- Assert.Equal(ThermalResistance.FromSquareMeterDegreesCelsiusPerWatt(2), 2.SquareMeterDegreesCelsiusPerWatt());
+ Assert.Equal(ThermalInsulance.FromSquareMeterDegreesCelsiusPerWatt(2), 2.SquareMeterDegreesCelsiusPerWatt());
[Fact]
public void NumberToSquareMeterKelvinsPerKilowattTest() =>
- Assert.Equal(ThermalResistance.FromSquareMeterKelvinsPerKilowatt(2), 2.SquareMeterKelvinsPerKilowatt());
+ Assert.Equal(ThermalInsulance.FromSquareMeterKelvinsPerKilowatt(2), 2.SquareMeterKelvinsPerKilowatt());
[Fact]
public void NumberToSquareMeterKelvinsPerWattTest() =>
- Assert.Equal(ThermalResistance.FromSquareMeterKelvinsPerWatt(2), 2.SquareMeterKelvinsPerWatt());
+ Assert.Equal(ThermalInsulance.FromSquareMeterKelvinsPerWatt(2), 2.SquareMeterKelvinsPerWatt());
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTorquePerLengthExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTorquePerLengthExtensionsTest.g.cs
deleted file mode 100644
index a86e82f967..0000000000
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToTorquePerLengthExtensionsTest.g.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by \generate-code.bat.
-//
-// Changes to this file will be lost when the code is regenerated.
-// The build server regenerates the code before each build and a pre-build
-// step will regenerate the code on each local build.
-//
-// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
-//
-// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
-// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
-//
-//
-//------------------------------------------------------------------------------
-
-// Licensed under MIT No Attribution, see LICENSE file at the root.
-// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
-
-using UnitsNet.NumberExtensions.NumberToTorquePerLength;
-using Xunit;
-
-namespace UnitsNet.Tests
-{
- public class NumberToTorquePerLengthExtensionsTests
- {
- [Fact]
- public void NumberToKilogramForceCentimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilogramForceCentimetersPerMeter(2), 2.KilogramForceCentimetersPerMeter());
-
- [Fact]
- public void NumberToKilogramForceMetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilogramForceMetersPerMeter(2), 2.KilogramForceMetersPerMeter());
-
- [Fact]
- public void NumberToKilogramForceMillimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilogramForceMillimetersPerMeter(2), 2.KilogramForceMillimetersPerMeter());
-
- [Fact]
- public void NumberToKilonewtonCentimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilonewtonCentimetersPerMeter(2), 2.KilonewtonCentimetersPerMeter());
-
- [Fact]
- public void NumberToKilonewtonMetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilonewtonMetersPerMeter(2), 2.KilonewtonMetersPerMeter());
-
- [Fact]
- public void NumberToKilonewtonMillimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromKilonewtonMillimetersPerMeter(2), 2.KilonewtonMillimetersPerMeter());
-
- [Fact]
- public void NumberToKilopoundForceFeetPerFootTest() =>
- Assert.Equal(TorquePerLength.FromKilopoundForceFeetPerFoot(2), 2.KilopoundForceFeetPerFoot());
-
- [Fact]
- public void NumberToKilopoundForceInchesPerFootTest() =>
- Assert.Equal(TorquePerLength.FromKilopoundForceInchesPerFoot(2), 2.KilopoundForceInchesPerFoot());
-
- [Fact]
- public void NumberToMeganewtonCentimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromMeganewtonCentimetersPerMeter(2), 2.MeganewtonCentimetersPerMeter());
-
- [Fact]
- public void NumberToMeganewtonMetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromMeganewtonMetersPerMeter(2), 2.MeganewtonMetersPerMeter());
-
- [Fact]
- public void NumberToMeganewtonMillimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromMeganewtonMillimetersPerMeter(2), 2.MeganewtonMillimetersPerMeter());
-
- [Fact]
- public void NumberToMegapoundForceFeetPerFootTest() =>
- Assert.Equal(TorquePerLength.FromMegapoundForceFeetPerFoot(2), 2.MegapoundForceFeetPerFoot());
-
- [Fact]
- public void NumberToMegapoundForceInchesPerFootTest() =>
- Assert.Equal(TorquePerLength.FromMegapoundForceInchesPerFoot(2), 2.MegapoundForceInchesPerFoot());
-
- [Fact]
- public void NumberToNewtonCentimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromNewtonCentimetersPerMeter(2), 2.NewtonCentimetersPerMeter());
-
- [Fact]
- public void NumberToNewtonMetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromNewtonMetersPerMeter(2), 2.NewtonMetersPerMeter());
-
- [Fact]
- public void NumberToNewtonMillimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromNewtonMillimetersPerMeter(2), 2.NewtonMillimetersPerMeter());
-
- [Fact]
- public void NumberToPoundForceFeetPerFootTest() =>
- Assert.Equal(TorquePerLength.FromPoundForceFeetPerFoot(2), 2.PoundForceFeetPerFoot());
-
- [Fact]
- public void NumberToPoundForceInchesPerFootTest() =>
- Assert.Equal(TorquePerLength.FromPoundForceInchesPerFoot(2), 2.PoundForceInchesPerFoot());
-
- [Fact]
- public void NumberToTonneForceCentimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromTonneForceCentimetersPerMeter(2), 2.TonneForceCentimetersPerMeter());
-
- [Fact]
- public void NumberToTonneForceMetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromTonneForceMetersPerMeter(2), 2.TonneForceMetersPerMeter());
-
- [Fact]
- public void NumberToTonneForceMillimetersPerMeterTest() =>
- Assert.Equal(TorquePerLength.FromTonneForceMillimetersPerMeter(2), 2.TonneForceMillimetersPerMeter());
-
- }
-}
diff --git a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeConcentrationExtensionsTest.g.cs b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeConcentrationExtensionsTest.g.cs
index fdd956a598..8c447de03a 100644
--- a/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeConcentrationExtensionsTest.g.cs
+++ b/UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToVolumeConcentrationExtensionsTest.g.cs
@@ -29,16 +29,16 @@ public void NumberToCentilitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromCentilitersPerLiter(2), 2.CentilitersPerLiter());
[Fact]
- public void NumberToCentilitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromCentilitersPerMililiter(2), 2.CentilitersPerMililiter());
+ public void NumberToCentilitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromCentilitersPerMilliliter(2), 2.CentilitersPerMilliliter());
[Fact]
public void NumberToDecilitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromDecilitersPerLiter(2), 2.DecilitersPerLiter());
[Fact]
- public void NumberToDecilitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromDecilitersPerMililiter(2), 2.DecilitersPerMililiter());
+ public void NumberToDecilitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromDecilitersPerMilliliter(2), 2.DecilitersPerMilliliter());
[Fact]
public void NumberToDecimalFractionsTest() =>
@@ -49,32 +49,32 @@ public void NumberToLitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromLitersPerLiter(2), 2.LitersPerLiter());
[Fact]
- public void NumberToLitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromLitersPerMililiter(2), 2.LitersPerMililiter());
+ public void NumberToLitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromLitersPerMilliliter(2), 2.LitersPerMilliliter());
[Fact]
public void NumberToMicrolitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromMicrolitersPerLiter(2), 2.MicrolitersPerLiter());
[Fact]
- public void NumberToMicrolitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromMicrolitersPerMililiter(2), 2.MicrolitersPerMililiter());
+ public void NumberToMicrolitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromMicrolitersPerMilliliter(2), 2.MicrolitersPerMilliliter());
[Fact]
public void NumberToMillilitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromMillilitersPerLiter(2), 2.MillilitersPerLiter());
[Fact]
- public void NumberToMillilitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromMillilitersPerMililiter(2), 2.MillilitersPerMililiter());
+ public void NumberToMillilitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromMillilitersPerMilliliter(2), 2.MillilitersPerMilliliter());
[Fact]
public void NumberToNanolitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromNanolitersPerLiter(2), 2.NanolitersPerLiter());
[Fact]
- public void NumberToNanolitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromNanolitersPerMililiter(2), 2.NanolitersPerMililiter());
+ public void NumberToNanolitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromNanolitersPerMilliliter(2), 2.NanolitersPerMilliliter());
[Fact]
public void NumberToPartsPerBillionTest() =>
@@ -101,8 +101,8 @@ public void NumberToPicolitersPerLiterTest() =>
Assert.Equal(VolumeConcentration.FromPicolitersPerLiter(2), 2.PicolitersPerLiter());
[Fact]
- public void NumberToPicolitersPerMililiterTest() =>
- Assert.Equal(VolumeConcentration.FromPicolitersPerMililiter(2), 2.PicolitersPerMililiter());
+ public void NumberToPicolitersPerMilliliterTest() =>
+ Assert.Equal(VolumeConcentration.FromPicolitersPerMilliliter(2), 2.PicolitersPerMilliliter());
}
}
diff --git a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
index c2254d90ba..95e55dfba7 100644
--- a/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
+++ b/UnitsNet.NumberExtensions.Tests/UnitsNet.NumberExtensions.Tests.csproj
@@ -1,7 +1,7 @@
- net9.0
+ net48;net8.0;net9.0
UnitsNet.NumberExtensions.Tests
latest
enable
@@ -19,14 +19,12 @@
-
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
index c4dc4f6742..8b6d6e5653 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAbsorbedDoseOfIonizingRadiationExtensions.g.cs
@@ -32,133 +32,181 @@ namespace UnitsNet.NumberExtensions.NumberToAbsorbedDoseOfIonizingRadiation
///
public static class NumberToAbsorbedDoseOfIonizingRadiationExtensions
{
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Centigrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromCentigrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromCentigrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromCentigrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Femtograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromFemtograys(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromFemtograys(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromFemtograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Gigagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromGigagrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromGigagrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromGigagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Grays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromGrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromGrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromGrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Kilograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromKilograys(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromKilograys(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromKilograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Kilorads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromKilorads(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromKilorads(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromKilorads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Megagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromMegagrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromMegagrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromMegagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Megarads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromMegarads(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromMegarads(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromMegarads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Micrograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromMicrograys(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromMicrograys(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromMicrograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Milligrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromMilligrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromMilligrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromMilligrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Millirads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromMillirads(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromMillirads(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromMillirads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Nanograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromNanograys(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromNanograys(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromNanograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Petagrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromPetagrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromPetagrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromPetagrays(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Picograys(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromPicograys(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromPicograys(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromPicograys(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Rads(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromRads(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromRads(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromRads(Convert.ToDouble(value));
- ///
+ ///
public static AbsorbedDoseOfIonizingRadiation Teragrays(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AbsorbedDoseOfIonizingRadiation.FromTeragrays(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AbsorbedDoseOfIonizingRadiation.FromTeragrays(value.ToDouble(null));
#endif
- => AbsorbedDoseOfIonizingRadiation.FromTeragrays(Convert.ToDouble(value));
}
}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
index 169625ebe9..c0eb105add 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAccelerationExtensions.g.cs
@@ -32,117 +32,159 @@ namespace UnitsNet.NumberExtensions.NumberToAcceleration
///
public static class NumberToAccelerationExtensions
{
- ///
+ ///
public static Acceleration CentimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromCentimetersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromCentimetersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromCentimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration DecimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromDecimetersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromDecimetersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromDecimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration FeetPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromFeetPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromFeetPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromFeetPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration InchesPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromInchesPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromInchesPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromInchesPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KilometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromKilometersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromKilometersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromKilometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerHour(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromKnotsPerHour(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromKnotsPerHour(value.ToDouble(null));
#endif
- => Acceleration.FromKnotsPerHour(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerMinute(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromKnotsPerMinute(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromKnotsPerMinute(value.ToDouble(null));
#endif
- => Acceleration.FromKnotsPerMinute(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration KnotsPerSecond(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromKnotsPerSecond(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromKnotsPerSecond(value.ToDouble(null));
#endif
- => Acceleration.FromKnotsPerSecond(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromMetersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromMetersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromMetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MicrometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromMicrometersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromMicrometersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromMicrometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MillimetersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromMillimetersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromMillimetersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromMillimetersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration MillistandardGravity(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromMillistandardGravity(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromMillistandardGravity(value.ToDouble(null));
#endif
- => Acceleration.FromMillistandardGravity(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration NanometersPerSecondSquared(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromNanometersPerSecondSquared(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromNanometersPerSecondSquared(value.ToDouble(null));
#endif
- => Acceleration.FromNanometersPerSecondSquared(Convert.ToDouble(value));
- ///
+ ///
public static Acceleration StandardGravity(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => Acceleration.FromStandardGravity(double.CreateChecked(value));
+#else
+ , IConvertible
+ => Acceleration.FromStandardGravity(value.ToDouble(null));
#endif
- => Acceleration.FromStandardGravity(Convert.ToDouble(value));
}
}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
index 25fc55c494..d68957f638 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmountOfSubstanceExtensions.g.cs
@@ -32,141 +32,192 @@ namespace UnitsNet.NumberExtensions.NumberToAmountOfSubstance
///
public static class NumberToAmountOfSubstanceExtensions
{
- ///
+ ///
public static AmountOfSubstance Centimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromCentimoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromCentimoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromCentimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance CentipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromCentipoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromCentipoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromCentipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Decimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromDecimoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromDecimoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromDecimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance DecipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromDecipoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromDecipoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromDecipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Femtomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromFemtomoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromFemtomoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromFemtomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Kilomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromKilomoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromKilomoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromKilomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance KilopoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromKilopoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromKilopoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromKilopoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Megamoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMegamoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMegamoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMegamoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Micromoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMicromoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMicromoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMicromoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance MicropoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMicropoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMicropoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMicropoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Millimoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMillimoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMillimoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMillimoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance MillipoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMillipoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMillipoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMillipoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Moles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Nanomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromNanomoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromNanomoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromNanomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance NanopoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromNanopoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromNanopoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromNanopoundMoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance Picomoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromPicomoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromPicomoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromPicomoles(Convert.ToDouble(value));
- ///
+ ///
public static AmountOfSubstance PoundMoles(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmountOfSubstance.FromPoundMoles(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmountOfSubstance.FromPoundMoles(value.ToDouble(null));
#endif
- => AmountOfSubstance.FromPoundMoles(Convert.ToDouble(value));
}
}
diff --git a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
index 1f3d3ae750..57d41c7817 100644
--- a/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
+++ b/UnitsNet.NumberExtensions/GeneratedCode/NumberToAmplitudeRatioExtensions.g.cs
@@ -32,37 +32,49 @@ namespace UnitsNet.NumberExtensions.NumberToAmplitudeRatio
///
public static class NumberToAmplitudeRatioExtensions
{
- ///
+ ///
public static AmplitudeRatio DecibelMicrovolts(this T value)
where T : notnull
#if NET7_0_OR_GREATER
, INumber
+ => AmplitudeRatio.FromDecibelMicrovolts(double.CreateChecked(value));
+#else
+ , IConvertible
+ => AmplitudeRatio.FromDecibelMicrovolts(value.ToDouble(null));
#endif
- => AmplitudeRatio.FromDecibelMicrovolts(Convert.ToDouble(value));
- ///