From 70fe940d2bb23d95b1b09d2f852661de6252d81d Mon Sep 17 00:00:00 2001 From: Andreas Gullberg Larsen Date: Sun, 26 Feb 2023 18:21:27 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20IEquatableQuantity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref #1193 In v5, equality changed to strict equality. This meant it became more cumbersome to compare equality for `IQuantity` objects of different units, but similar value when converted to the same unit. - Add interface `IEquatableQuantity` to help compare `IQuantity` objects with a tolerance for error --- .../UnitsNetGen/QuantityGenerator.cs | 1 + .../Quantities/Acceleration.g.cs | 1 + .../Quantities/AmountOfSubstance.g.cs | 1 + .../Quantities/AmplitudeRatio.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 1 + .../Quantities/ApparentEnergy.g.cs | 1 + .../Quantities/ApparentPower.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Area.g.cs | 1 + .../GeneratedCode/Quantities/AreaDensity.g.cs | 1 + .../Quantities/AreaMomentOfInertia.g.cs | 1 + .../GeneratedCode/Quantities/BitRate.g.cs | 1 + .../BrakeSpecificFuelConsumption.g.cs | 1 + .../GeneratedCode/Quantities/Capacitance.g.cs | 1 + .../CoefficientOfThermalExpansion.g.cs | 1 + .../Quantities/Compressibility.g.cs | 1 + .../GeneratedCode/Quantities/Density.g.cs | 1 + .../GeneratedCode/Quantities/Duration.g.cs | 1 + .../Quantities/DynamicViscosity.g.cs | 1 + .../Quantities/ElectricAdmittance.g.cs | 1 + .../Quantities/ElectricCharge.g.cs | 1 + .../Quantities/ElectricChargeDensity.g.cs | 1 + .../Quantities/ElectricConductance.g.cs | 1 + .../Quantities/ElectricConductivity.g.cs | 1 + .../Quantities/ElectricCurrent.g.cs | 1 + .../Quantities/ElectricCurrentDensity.g.cs | 1 + .../Quantities/ElectricCurrentGradient.g.cs | 1 + .../Quantities/ElectricField.g.cs | 1 + .../Quantities/ElectricInductance.g.cs | 1 + .../Quantities/ElectricPotential.g.cs | 1 + .../Quantities/ElectricPotentialAc.g.cs | 1 + .../ElectricPotentialChangeRate.g.cs | 1 + .../Quantities/ElectricPotentialDc.g.cs | 1 + .../Quantities/ElectricResistance.g.cs | 1 + .../Quantities/ElectricResistivity.g.cs | 1 + .../ElectricSurfaceChargeDensity.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 1 + .../Quantities/EnergyDensity.g.cs | 1 + .../GeneratedCode/Quantities/Entropy.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Force.g.cs | 1 + .../Quantities/ForceChangeRate.g.cs | 1 + .../Quantities/ForcePerLength.g.cs | 1 + .../GeneratedCode/Quantities/Frequency.g.cs | 1 + .../Quantities/FuelEfficiency.g.cs | 1 + .../GeneratedCode/Quantities/HeatFlux.g.cs | 1 + .../Quantities/HeatTransferCoefficient.g.cs | 1 + .../GeneratedCode/Quantities/Illuminance.g.cs | 1 + .../GeneratedCode/Quantities/Impulse.g.cs | 1 + .../GeneratedCode/Quantities/Information.g.cs | 1 + .../GeneratedCode/Quantities/Irradiance.g.cs | 1 + .../GeneratedCode/Quantities/Irradiation.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Jerk.g.cs | 1 + .../Quantities/KinematicViscosity.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Length.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Level.g.cs | 1 + .../Quantities/LinearDensity.g.cs | 1 + .../Quantities/LinearPowerDensity.g.cs | 1 + .../GeneratedCode/Quantities/Luminance.g.cs | 1 + .../GeneratedCode/Quantities/Luminosity.g.cs | 1 + .../Quantities/LuminousFlux.g.cs | 1 + .../Quantities/LuminousIntensity.g.cs | 1 + .../Quantities/MagneticField.g.cs | 1 + .../Quantities/MagneticFlux.g.cs | 1 + .../Quantities/Magnetization.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 1 + .../Quantities/MassConcentration.g.cs | 1 + .../GeneratedCode/Quantities/MassFlow.g.cs | 1 + .../GeneratedCode/Quantities/MassFlux.g.cs | 1 + .../Quantities/MassFraction.g.cs | 1 + .../Quantities/MassMomentOfInertia.g.cs | 1 + .../GeneratedCode/Quantities/MolarEnergy.g.cs | 1 + .../Quantities/MolarEntropy.g.cs | 1 + .../GeneratedCode/Quantities/MolarFlow.g.cs | 1 + .../GeneratedCode/Quantities/MolarMass.g.cs | 1 + .../GeneratedCode/Quantities/Molarity.g.cs | 1 + .../Quantities/Permeability.g.cs | 1 + .../Quantities/Permittivity.g.cs | 1 + .../Quantities/PorousMediumPermeability.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Power.g.cs | 1 + .../Quantities/PowerDensity.g.cs | 1 + .../GeneratedCode/Quantities/PowerRatio.g.cs | 1 + .../GeneratedCode/Quantities/Pressure.g.cs | 1 + .../Quantities/PressureChangeRate.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Ratio.g.cs | 1 + .../Quantities/RatioChangeRate.g.cs | 1 + .../Quantities/ReactiveEnergy.g.cs | 1 + .../Quantities/ReactivePower.g.cs | 1 + .../Quantities/ReciprocalArea.g.cs | 1 + .../Quantities/ReciprocalLength.g.cs | 1 + .../Quantities/RelativeHumidity.g.cs | 1 + .../Quantities/RotationalAcceleration.g.cs | 1 + .../Quantities/RotationalSpeed.g.cs | 1 + .../Quantities/RotationalStiffness.g.cs | 1 + .../RotationalStiffnessPerLength.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Scalar.g.cs | 1 + .../GeneratedCode/Quantities/SolidAngle.g.cs | 1 + .../Quantities/SpecificEnergy.g.cs | 1 + .../Quantities/SpecificEntropy.g.cs | 1 + .../Quantities/SpecificFuelConsumption.g.cs | 1 + .../Quantities/SpecificVolume.g.cs | 1 + .../Quantities/SpecificWeight.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 1 + .../Quantities/StandardVolumeFlow.g.cs | 1 + .../GeneratedCode/Quantities/Temperature.g.cs | 1 + .../Quantities/TemperatureChangeRate.g.cs | 1 + .../Quantities/TemperatureDelta.g.cs | 1 + .../Quantities/TemperatureGradient.g.cs | 1 + .../Quantities/ThermalConductivity.g.cs | 1 + .../Quantities/ThermalResistance.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Torque.g.cs | 1 + .../Quantities/TorquePerLength.g.cs | 1 + .../GeneratedCode/Quantities/Turbidity.g.cs | 1 + .../GeneratedCode/Quantities/VitaminA.g.cs | 1 + UnitsNet/GeneratedCode/Quantities/Volume.g.cs | 1 + .../Quantities/VolumeConcentration.g.cs | 1 + .../GeneratedCode/Quantities/VolumeFlow.g.cs | 1 + .../Quantities/VolumeFlowPerArea.g.cs | 1 + .../Quantities/VolumePerLength.g.cs | 1 + .../Quantities/VolumetricHeatCapacity.g.cs | 1 + .../Quantities/WarpingMomentOfInertia.g.cs | 1 + UnitsNet/IEquatableQuantity.cs | 52 +++++++++++++++++++ 120 files changed, 171 insertions(+) create mode 100644 UnitsNet/IEquatableQuantity.cs diff --git a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs index e24187a44a..f323b96b05 100644 --- a/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs +++ b/CodeGen/Generators/UnitsNetGen/QuantityGenerator.cs @@ -75,6 +75,7 @@ namespace UnitsNet IComparable<{_quantity.Name}>, IConvertible, IEquatable<{_quantity.Name}>, + IEquatableQuantity<{_quantity.Name}>, IFormattable"); Writer.WL($@" diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 5f3dd45798..67bdaae9bb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs index 282ca4d8f4..51ed9ad146 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmountOfSubstance.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs index a94bc8ce84..10e1573878 100644 --- a/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AmplitudeRatio.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index cb2b23e64a..b611d58dc7 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs index cc1bdd4424..fec9c5695f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentEnergy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs index e56fde815e..1495de9251 100644 --- a/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ApparentPower.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 2aae2a530f..e857480485 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs index 9a0d608110..7724626d4e 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaDensity.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs index 4af264c8db..6885571623 100644 --- a/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs index 8db221fcb8..4794b5ab2e 100644 --- a/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BitRate.g.cs @@ -46,6 +46,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index ed145e5ad6..7cd07ddeb4 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs index d7d5edfda3..6100410d3f 100644 --- a/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Capacitance.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs index e726e15ff8..aad7fa7270 100644 --- a/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs index e4d3631cef..c73f706525 100644 --- a/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Compressibility.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 8c81963398..2e7cae1187 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs index 0cef91e5f9..9c3629c5e4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Duration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Duration.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs index 2a8d5cbe4d..8cdcd2f2b8 100644 --- a/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/DynamicViscosity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs index 232440e112..1a369e94e5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricAdmittance.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index e64aefaa4b..f74e7371e6 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs index a04af1a886..b6d83b6b36 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricChargeDensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs index 556b184716..2e84ba7af5 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductance.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs index c64dc15f63..fc2d326e27 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricConductivity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index 2bc7b43b3f..c9abe6c3fe 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs index 191af4a03e..a5eba03934 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentDensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs index 54c859d108..0d8b216315 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrentGradient.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs index 02346ce25f..875051a5fb 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricField.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs index 0f2b4d736f..ce01cabbc7 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricInductance.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs index a4c4f355ce..0f0b4628aa 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotential.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs index e9848afff4..34ebdef81a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialAc.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs index f4e4aef001..7cbb924aaa 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialChangeRate.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs index a00427ffcc..473f9f339a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricPotentialDc.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs index fdc2fbed03..d4bf7829b1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistance.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs index 985fe0784a..db9efe035e 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricResistivity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs index 292ef326d7..63404e149b 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricSurfaceChargeDensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 0661164028..036b9f11cc 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs index fad9a2102f..49c33b14cf 100644 --- a/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/EnergyDensity.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs index 1ef1425455..ce65edf3a1 100644 --- a/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Entropy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Force.g.cs b/UnitsNet/GeneratedCode/Quantities/Force.g.cs index b5455b4f61..f24bba5690 100644 --- a/UnitsNet/GeneratedCode/Quantities/Force.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Force.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs index 15612cadd2..56df34de5f 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForceChangeRate.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs index 2b9c63267f..73fddcd0e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ForcePerLength.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs index 6731686ffc..80effbd80d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Frequency.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs index 35de26f722..0db98d9754 100644 --- a/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/FuelEfficiency.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs index 85a500d776..bbaa0f357c 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatFlux.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs index ee1f097396..85d6f2646c 100644 --- a/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/HeatTransferCoefficient.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs index 16b7e90370..ead6edcf36 100644 --- a/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Illuminance.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs index 0bba3581fd..9b77bcee79 100644 --- a/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Impulse.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Information.g.cs b/UnitsNet/GeneratedCode/Quantities/Information.g.cs index ab4caa805a..46b483d977 100644 --- a/UnitsNet/GeneratedCode/Quantities/Information.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Information.g.cs @@ -43,6 +43,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs index f89a2d7fef..d291968469 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiance.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs index 6ab3cfb88f..b3734e5115 100644 --- a/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Irradiation.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs index bdc3ca4e95..c66f619fcb 100644 --- a/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Jerk.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 3b215e0fb1..61731b5a03 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index 1ef038437f..6b8e6c8872 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Level.g.cs b/UnitsNet/GeneratedCode/Quantities/Level.g.cs index ca578f6098..f7ea38e536 100644 --- a/UnitsNet/GeneratedCode/Quantities/Level.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Level.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs index 6e9ab51b53..ca9d5fc877 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearDensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs index adb8def604..0a0034df30 100644 --- a/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LinearPowerDensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs index 53a6b9bc8c..5599d8e28e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminance.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs index 5aa6bb0a2c..c406390e88 100644 --- a/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Luminosity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs index b41377f0bd..bd526fd664 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousFlux.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs index d3a95c452e..0e33032b66 100644 --- a/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/LuminousIntensity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs index 62d0cb377d..694d34f093 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticField.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs index a67f67e6b0..858314fd53 100644 --- a/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MagneticFlux.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs index c5543f6831..ee0ac53aa4 100644 --- a/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Magnetization.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index eb481b349e..be6f605e10 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs index f4385b6f3b..807f757a13 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassConcentration.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index 04e2b49d3f..ec176dc28f 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs index 4ded627074..199626c583 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlux.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs index dcdf6062b4..f78c1ba746 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFraction.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs index ec6ea48f9b..4d6bd388d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassMomentOfInertia.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs index 26be1f3ed8..0a7c19ef75 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEnergy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs index 542dee95f2..d6ede3e29c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarEntropy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 39d2cc4624..3640a1708b 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index b2c9b873d3..fd37ce13d7 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs index 0051b03c03..29a62df619 100644 --- a/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Molarity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs index 1d578aef59..407a4054e3 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permeability.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs index 1a4925f32d..0f53c30e34 100644 --- a/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Permittivity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs index c7a958f858..1997af1622 100644 --- a/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PorousMediumPermeability.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index fcc342196a..55c283d458 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -43,6 +43,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs index fe5a1f5593..ef26abdea8 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerDensity.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs index 882a11ef87..338b05eae7 100644 --- a/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PowerRatio.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 6b25c25127..535db613c5 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs index 1ef0029558..915209379a 100644 --- a/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs index 85fb4393f6..6ffae72447 100644 --- a/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Ratio.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs index b61ac30a1b..434b483ab4 100644 --- a/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RatioChangeRate.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs index 3d2f61fa13..1b666a8f6c 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactiveEnergy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs index cb2e24cd45..ac8de1a0df 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReactivePower.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs index 96d295d791..d6c9b7be2a 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalArea.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs index cfcc09f5e1..ad8cac73e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ReciprocalLength.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs index 0807dbc776..ec7c159b25 100644 --- a/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RelativeHumidity.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs index 3799335636..df315cf576 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalAcceleration.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs index 49918bc485..159bf84fe0 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalSpeed.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs index 3c09a8ca14..1f9acc6b07 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffness.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs index a3e2fc8652..ef94da2409 100644 --- a/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/RotationalStiffnessPerLength.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs index f05f232218..f0c52d5555 100644 --- a/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Scalar.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs index 0547f50361..976db2e46d 100644 --- a/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SolidAngle.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index a36a03aba6..64c34481e1 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs index 147b9d4f39..1a3fa21d9d 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEntropy.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs index 551286d9a5..11fd92a67a 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificFuelConsumption.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs index 9993d62a6b..87fff8c950 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificVolume.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs index 88327d22ad..6718317364 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificWeight.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index f384981e4b..784e32f7a9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs index 9c8b90e74b..1cae165fbf 100644 --- a/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/StandardVolumeFlow.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs index 7d247ce33e..72eccc2755 100644 --- a/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Temperature.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs index ee625dbab0..1c4ae39998 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureChangeRate.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 500a19b820..8db4476b09 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs index e40e1061ef..7c25217e19 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureGradient.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs index c2d36a6b84..c5e6081770 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalConductivity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs index 7fd8bc6442..31e213f0c3 100644 --- a/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ThermalResistance.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs index 46e6d66442..9d1b0ddf57 100644 --- a/UnitsNet/GeneratedCode/Quantities/Torque.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Torque.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs index 218513fafa..9ef9af0862 100644 --- a/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TorquePerLength.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs index d06aeed778..35b3d1aeaf 100644 --- a/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Turbidity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs index 9d833aac79..ef8b3be77e 100644 --- a/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VitaminA.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs index a0b8de8e1f..47e209077d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Volume.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Volume.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs index d059a21bc4..c04bfc91b5 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeConcentration.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index f8ae4371a8..c76bfb3bee 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs index a483480422..e581d91830 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlowPerArea.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs index 291cd1311b..f12fbbe7e3 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumePerLength.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs index a45a2d0c32..2fe715b9c8 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumetricHeatCapacity.g.cs @@ -45,6 +45,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs index 8956db558e..6c3d7043ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/WarpingMomentOfInertia.g.cs @@ -42,6 +42,7 @@ namespace UnitsNet IComparable, IConvertible, IEquatable, + IEquatableQuantity, IFormattable { /// diff --git a/UnitsNet/IEquatableQuantity.cs b/UnitsNet/IEquatableQuantity.cs new file mode 100644 index 0000000000..db3798b0e6 --- /dev/null +++ b/UnitsNet/IEquatableQuantity.cs @@ -0,0 +1,52 @@ +// 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. + +namespace UnitsNet; + +/// +/// Compare equality to another within the given absolute or relative tolerance. +/// +/// Type of quantity. +public interface IEquatableQuantity +{ + /// + /// + /// Compare equality to another within the given absolute or relative tolerance. + /// + /// + /// Relative tolerance is defined as the maximum allowable absolute difference between this quantity's value and + /// as a percentage of this quantity's value. will be converted into + /// this quantity's unit for comparison. A relative tolerance of 0.01 means the absolute difference must be within +/- 1% of + /// this quantity's value to be considered equal. + /// + /// In this example, the two quantities will be equal if the value of b is within +/- 1% of a (0.02m or 2cm). + /// + /// var a = Length.FromMeters(2.0); + /// var b = Length.FromInches(50.0); + /// a.Equals(b, 0.01, ComparisonType.Relative); + /// + /// + /// + /// + /// Absolute tolerance is defined as the maximum allowable absolute difference between this quantity's value and + /// as a fixed number in this quantity's unit. will be converted into + /// this quantity's unit for comparison. + /// + /// In this example, the two quantities will be equal if the value of b is within 0.01 of a (0.01m or 1cm). + /// + /// var a = Length.FromMeters(2.0); + /// var b = Length.FromInches(50.0); + /// a.Equals(b, 0.01, ComparisonType.Absolute); + /// + /// + /// + /// + /// Note that it is advised against specifying zero difference, due to the nature of floating-point operations and using double internally. + /// + /// + /// The other quantity to compare to. + /// The absolute or relative tolerance value. Must be greater than or equal to 0. + /// 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. + bool Equals(TQuantity? other, double tolerance, ComparisonType comparisonType); +}