From 7046318fd078e4b15669333fe9567dfe9804e930 Mon Sep 17 00:00:00 2001 From: Muximize Date: Mon, 8 Jan 2024 12:31:06 +0100 Subject: [PATCH] Generated code with re-sorted operators --- .../Quantities/Acceleration.g.cs | 14 ++--- UnitsNet/GeneratedCode/Quantities/Angle.g.cs | 14 ++--- UnitsNet/GeneratedCode/Quantities/Area.g.cs | 14 ++--- .../BrakeSpecificFuelConsumption.g.cs | 14 ++--- .../GeneratedCode/Quantities/Density.g.cs | 14 ++--- .../Quantities/ElectricCharge.g.cs | 14 ++--- .../Quantities/ElectricCurrent.g.cs | 40 +++++++------- UnitsNet/GeneratedCode/Quantities/Energy.g.cs | 14 ++--- .../Quantities/KinematicViscosity.g.cs | 26 +++++----- UnitsNet/GeneratedCode/Quantities/Length.g.cs | 14 ++--- UnitsNet/GeneratedCode/Quantities/Mass.g.cs | 52 +++++++++---------- .../GeneratedCode/Quantities/MassFlow.g.cs | 42 +++++++-------- .../GeneratedCode/Quantities/MolarFlow.g.cs | 26 +++++----- .../GeneratedCode/Quantities/MolarMass.g.cs | 14 ++--- UnitsNet/GeneratedCode/Quantities/Power.g.cs | 26 +++++----- .../GeneratedCode/Quantities/Pressure.g.cs | 14 ++--- .../Quantities/SpecificEnergy.g.cs | 14 ++--- UnitsNet/GeneratedCode/Quantities/Speed.g.cs | 40 +++++++------- .../Quantities/TemperatureDelta.g.cs | 14 ++--- .../GeneratedCode/Quantities/VolumeFlow.g.cs | 12 ++--- 20 files changed, 216 insertions(+), 216 deletions(-) diff --git a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs index 725c643340..ce03b1f8be 100644 --- a/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Acceleration.g.cs @@ -44,9 +44,9 @@ namespace UnitsNet #if NET7_0_OR_GREATER IMultiplyOperators, IDivisionOperators, + IDivisionOperators, IMultiplyOperators, IMultiplyOperators, - IDivisionOperators, IMultiplyOperators, #endif IComparable, @@ -689,6 +689,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Accel return Jerk.FromMetersPerSecondCubed(acceleration.MetersPerSecondSquared / duration.Seconds); } + /// Get from / . + public static Jerk operator /(Acceleration acceleration, TimeSpan timeSpan) + { + return Jerk.FromMetersPerSecondCubed(acceleration.MetersPerSecondSquared / timeSpan.TotalSeconds); + } + /// Get from * . public static SpecificWeight operator *(Acceleration acceleration, Density density) { @@ -701,12 +707,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Accel return Speed.FromMetersPerSecond(acceleration.MetersPerSecondSquared * duration.Seconds); } - /// Get from / . - public static Jerk operator /(Acceleration acceleration, TimeSpan timeSpan) - { - return Jerk.FromMetersPerSecondCubed(acceleration.MetersPerSecondSquared / timeSpan.TotalSeconds); - } - /// Get from * . public static Speed operator *(Acceleration acceleration, TimeSpan timeSpan) { diff --git a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs index 4761c4392e..a4fb3cc421 100644 --- a/UnitsNet/GeneratedCode/Quantities/Angle.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Angle.g.cs @@ -43,8 +43,8 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IDivisionOperators, - IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -716,18 +716,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Angle return RotationalSpeed.FromRadiansPerSecond(angle.Radians / duration.Seconds); } - /// Get from * . - public static Torque operator *(Angle angle, RotationalStiffness rotationalStiffness) - { - return Torque.FromNewtonMeters(angle.Radians * rotationalStiffness.NewtonMetersPerRadian); - } - /// Get from / . public static RotationalSpeed operator /(Angle angle, TimeSpan timeSpan) { return RotationalSpeed.FromRadiansPerSecond(angle.Radians / timeSpan.TotalSeconds); } + /// Get from * . + public static Torque operator *(Angle angle, RotationalStiffness rotationalStiffness) + { + return Torque.FromNewtonMeters(angle.Radians * rotationalStiffness.NewtonMetersPerRadian); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Area.g.cs b/UnitsNet/GeneratedCode/Quantities/Area.g.cs index 195f583d77..fda5efd22d 100644 --- a/UnitsNet/GeneratedCode/Quantities/Area.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Area.g.cs @@ -47,8 +47,8 @@ namespace UnitsNet IDivisionOperators, IMultiplyOperators, IMultiplyOperators, - IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, @@ -713,18 +713,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out AreaU return LuminousIntensity.FromCandela(area.SquareMeters * luminance.CandelasPerSquareMeter); } - /// Get from * . - public static Mass operator *(Area area, AreaDensity areaDensity) - { - return Mass.FromKilograms(area.SquareMeters * areaDensity.KilogramsPerSquareMeter); - } - /// Get from * . public static MassFlow operator *(Area area, MassFlux massFlux) { return MassFlow.FromGramsPerSecond(area.SquareMeters * massFlux.GramsPerSecondPerSquareMeter); } + /// Get from * . + public static Mass operator *(Area area, AreaDensity areaDensity) + { + return Mass.FromKilograms(area.SquareMeters * areaDensity.KilogramsPerSquareMeter); + } + /// Get from * . public static Power operator *(Area area, HeatFlux heatFlux) { diff --git a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs index e90e9e2e5f..8641493c0f 100644 --- a/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/BrakeSpecificFuelConsumption.g.cs @@ -42,8 +42,8 @@ namespace UnitsNet public readonly partial struct BrakeSpecificFuelConsumption : IArithmeticQuantity, #if NET7_0_OR_GREATER - IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -475,12 +475,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Brake #region Relational Operators - /// Get from * . - public static double operator *(BrakeSpecificFuelConsumption brakeSpecificFuelConsumption, SpecificEnergy specificEnergy) - { - return brakeSpecificFuelConsumption.KilogramsPerJoule * specificEnergy.JoulesPerKilogram; - } - /// Get from * . public static MassFlow operator *(BrakeSpecificFuelConsumption brakeSpecificFuelConsumption, Power power) { @@ -493,6 +487,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Brake return SpecificEnergy.FromJoulesPerKilogram(value / brakeSpecificFuelConsumption.KilogramsPerJoule); } + /// Get from * . + public static double operator *(BrakeSpecificFuelConsumption brakeSpecificFuelConsumption, SpecificEnergy specificEnergy) + { + return brakeSpecificFuelConsumption.KilogramsPerJoule * specificEnergy.JoulesPerKilogram; + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Density.g.cs b/UnitsNet/GeneratedCode/Quantities/Density.g.cs index 423151009a..402868e34a 100644 --- a/UnitsNet/GeneratedCode/Quantities/Density.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Density.g.cs @@ -47,10 +47,10 @@ namespace UnitsNet #if NET7_0_OR_GREATER IMultiplyOperators, IMultiplyOperators, - IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, #endif IComparable, @@ -1449,12 +1449,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Densi return LinearDensity.FromKilogramsPerMeter(density.KilogramsPerCubicMeter * area.SquareMeters); } - /// Get from * . - public static Mass operator *(Density density, Volume volume) - { - return Mass.FromKilograms(density.KilogramsPerCubicMeter * volume.CubicMeters); - } - /// Get from * . public static MassConcentration operator *(Density density, VolumeConcentration volumeConcentration) { @@ -1473,6 +1467,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Densi return MassFlux.FromKilogramsPerSecondPerSquareMeter(density.KilogramsPerCubicMeter * speed.MetersPerSecond); } + /// Get from * . + public static Mass operator *(Density density, Volume volume) + { + return Mass.FromKilograms(density.KilogramsPerCubicMeter * volume.CubicMeters); + } + /// Get from * . public static SpecificWeight operator *(Density density, Acceleration acceleration) { diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs index ba31a49c68..b5a88574de 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCharge.g.cs @@ -47,8 +47,8 @@ namespace UnitsNet #if NET7_0_OR_GREATER IDivisionOperators, IDivisionOperators, - IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -636,18 +636,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Elect return ElectricCurrent.FromAmperes(electricCharge.AmpereHours / duration.Hours); } - /// Get from * . - public static Energy operator *(ElectricCharge electricCharge, ElectricPotential electricPotential) - { - return Energy.FromJoules(electricCharge.Coulombs * electricPotential.Volts); - } - /// Get from / . public static ElectricCurrent operator /(ElectricCharge electricCharge, TimeSpan timeSpan) { return ElectricCurrent.FromAmperes(electricCharge.AmpereHours / timeSpan.TotalHours); } + /// Get from * . + public static Energy operator *(ElectricCharge electricCharge, ElectricPotential electricPotential) + { + return Energy.FromJoules(electricCharge.Coulombs * electricPotential.Volts); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs index 57c083f1c8..bf5fb2e7dd 100644 --- a/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/ElectricCurrent.g.cs @@ -43,11 +43,11 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IMultiplyOperators, + IMultiplyOperators, IDivisionOperators, + IDivisionOperators, IMultiplyOperators, IMultiplyOperators, - IMultiplyOperators, - IDivisionOperators, #endif IComparable, IComparable, @@ -593,24 +593,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Elect return ElectricCharge.FromAmpereHours(electricCurrent.Amperes * duration.Hours); } - /// Get from / . - public static ElectricCurrentGradient operator /(ElectricCurrent electricCurrent, Duration duration) - { - return ElectricCurrentGradient.FromAmperesPerSecond(electricCurrent.Amperes / duration.Seconds); - } - - /// Get from * . - public static ElectricPotential operator *(ElectricCurrent electricCurrent, ElectricResistance electricResistance) - { - return ElectricPotential.FromVolts(electricCurrent.Amperes * electricResistance.Ohms); - } - - /// Get from * . - public static Power operator *(ElectricCurrent electricCurrent, ElectricPotential electricPotential) - { - return Power.FromWatts(electricCurrent.Amperes * electricPotential.Volts); - } - /// Get from * . public static ElectricCharge operator *(ElectricCurrent electricCurrent, TimeSpan timeSpan) { @@ -623,12 +605,30 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Elect return ElectricCharge.FromAmpereHours(timeSpan.TotalHours * electricCurrent.Amperes); } + /// Get from / . + public static ElectricCurrentGradient operator /(ElectricCurrent electricCurrent, Duration duration) + { + return ElectricCurrentGradient.FromAmperesPerSecond(electricCurrent.Amperes / duration.Seconds); + } + /// Get from / . public static ElectricCurrentGradient operator /(ElectricCurrent electricCurrent, TimeSpan timeSpan) { return ElectricCurrentGradient.FromAmperesPerSecond(electricCurrent.Amperes / timeSpan.TotalSeconds); } + /// Get from * . + public static ElectricPotential operator *(ElectricCurrent electricCurrent, ElectricResistance electricResistance) + { + return ElectricPotential.FromVolts(electricCurrent.Amperes * electricResistance.Ohms); + } + + /// Get from * . + public static Power operator *(ElectricCurrent electricCurrent, ElectricPotential electricPotential) + { + return Power.FromWatts(electricCurrent.Amperes * electricPotential.Volts); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs index 673d0ca5f2..e36ff1fdf0 100644 --- a/UnitsNet/GeneratedCode/Quantities/Energy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Energy.g.cs @@ -49,9 +49,9 @@ namespace UnitsNet IDivisionOperators, IMultiplyOperators, IDivisionOperators, + IDivisionOperators, IDivisionOperators, IDivisionOperators, - IDivisionOperators, #endif IComparable, IComparable, @@ -1191,6 +1191,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Energ return Power.FromWatts(energy.Joules / duration.Seconds); } + /// Get from / . + public static Power operator /(Energy energy, TimeSpan timeSpan) + { + return Power.FromWatts(energy.Joules / timeSpan.TotalSeconds); + } + /// Get from / . public static SpecificEnergy operator /(Energy energy, Mass mass) { @@ -1203,12 +1209,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Energ return TemperatureDelta.FromKelvins(energy.Joules / entropy.JoulesPerKelvin); } - /// Get from / . - public static Power operator /(Energy energy, TimeSpan timeSpan) - { - return Power.FromWatts(energy.Joules / timeSpan.TotalSeconds); - } - #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs index 71eed52ba8..deedb07266 100644 --- a/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/KinematicViscosity.g.cs @@ -46,9 +46,9 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, IDivisionOperators, - IMultiplyOperators, #endif IComparable, IComparable, @@ -594,18 +594,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Kinem return Area.FromSquareMeters(kinematicViscosity.SquareMetersPerSecond * duration.Seconds); } - /// Get from * . - public static DynamicViscosity operator *(KinematicViscosity kinematicViscosity, Density density) - { - return DynamicViscosity.FromNewtonSecondsPerMeterSquared(kinematicViscosity.SquareMetersPerSecond * density.KilogramsPerCubicMeter); - } - - /// Get from / . - public static Speed operator /(KinematicViscosity kinematicViscosity, Length length) - { - return Speed.FromMetersPerSecond(kinematicViscosity.SquareMetersPerSecond / length.Meters); - } - /// Get from * . public static Area operator *(KinematicViscosity kinematicViscosity, TimeSpan timeSpan) { @@ -618,6 +606,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Kinem return Area.FromSquareMeters(timeSpan.TotalSeconds * kinematicViscosity.SquareMetersPerSecond); } + /// Get from * . + public static DynamicViscosity operator *(KinematicViscosity kinematicViscosity, Density density) + { + return DynamicViscosity.FromNewtonSecondsPerMeterSquared(kinematicViscosity.SquareMetersPerSecond * density.KilogramsPerCubicMeter); + } + + /// Get from / . + public static Speed operator /(KinematicViscosity kinematicViscosity, Length length) + { + return Speed.FromMetersPerSecond(kinematicViscosity.SquareMetersPerSecond / length.Meters); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Length.g.cs b/UnitsNet/GeneratedCode/Quantities/Length.g.cs index e0e2fc0314..ec8a4ad7ff 100644 --- a/UnitsNet/GeneratedCode/Quantities/Length.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Length.g.cs @@ -50,10 +50,10 @@ namespace UnitsNet IMultiplyOperators, IMultiplyOperators, IDivisionOperators, + IDivisionOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, - IDivisionOperators, #endif IComparable, IComparable, @@ -1242,6 +1242,12 @@ public ReciprocalLength Inverse() return Speed.FromMetersPerSecond(length.Meters / duration.Seconds); } + /// Get from / . + public static Speed operator /(Length length, TimeSpan timeSpan) + { + return Speed.FromMetersPerSecond(length.Meters / timeSpan.TotalSeconds); + } + /// Get from * . public static TemperatureDelta operator *(Length length, TemperatureGradient temperatureGradient) { @@ -1260,12 +1266,6 @@ public ReciprocalLength Inverse() return Volume.FromCubicMeters(length.Meters * area.SquareMeters); } - /// Get from / . - public static Speed operator /(Length length, TimeSpan timeSpan) - { - return Speed.FromMetersPerSecond(length.Meters / timeSpan.TotalSeconds); - } - #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs index 2d7fb4290b..548941e138 100644 --- a/UnitsNet/GeneratedCode/Quantities/Mass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Mass.g.cs @@ -43,20 +43,20 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IDivisionOperators, - IDivisionOperators, IDivisionOperators, + IDivisionOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IDivisionOperators, - IDivisionOperators, - IMultiplyOperators, IDivisionOperators, - IDivisionOperators, - IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, + IDivisionOperators, + IMultiplyOperators, + IDivisionOperators, #endif IComparable, IComparable, @@ -926,18 +926,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out MassU return AmountOfSubstance.FromMoles(mass.Kilograms / molarMass.KilogramsPerMole); } - /// Get from / . - public static Area operator /(Mass mass, AreaDensity areaDensity) - { - return Area.FromSquareMeters(mass.Kilograms / areaDensity.KilogramsPerSquareMeter); - } - /// Get from / . public static AreaDensity operator /(Mass mass, Area area) { return AreaDensity.FromKilogramsPerSquareMeter(mass.Kilograms / area.SquareMeters); } + /// Get from / . + public static Area operator /(Mass mass, AreaDensity areaDensity) + { + return Area.FromSquareMeters(mass.Kilograms / areaDensity.KilogramsPerSquareMeter); + } + /// Get from / . public static Density operator /(Mass mass, Volume volume) { @@ -974,28 +974,28 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out MassU return LinearDensity.FromKilogramsPerMeter(mass.Kilograms / length.Meters); } - /// Get from / . - public static Mass operator /(Mass mass, MassFraction massFraction) + /// Get from / . + public static MassFlow operator /(Mass mass, Duration duration) { - return Mass.FromKilograms(mass.Kilograms / massFraction.DecimalFractions); + return MassFlow.FromKilogramsPerSecond(mass.Kilograms / duration.Seconds); } - /// Get from * . - public static Mass operator *(Mass mass, MassFraction massFraction) + /// Get from / . + public static MassFlow operator /(Mass mass, TimeSpan timeSpan) { - return Mass.FromKilograms(mass.Kilograms * massFraction.DecimalFractions); + return MassFlow.FromKilogramsPerSecond(mass.Kilograms / timeSpan.TotalSeconds); } - /// Get from / . - public static MassFlow operator /(Mass mass, Duration duration) + /// Get from * . + public static Mass operator *(Mass mass, MassFraction massFraction) { - return MassFlow.FromKilogramsPerSecond(mass.Kilograms / duration.Seconds); + return Mass.FromKilograms(mass.Kilograms * massFraction.DecimalFractions); } - /// Get from / . - public static Volume operator /(Mass mass, Density density) + /// Get from / . + public static Mass operator /(Mass mass, MassFraction massFraction) { - return Volume.FromCubicMeters(mass.Kilograms / density.KilogramsPerCubicMeter); + return Mass.FromKilograms(mass.Kilograms / massFraction.DecimalFractions); } /// Get from * . @@ -1004,10 +1004,10 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out MassU return Volume.FromCubicMeters(mass.Kilograms * specificVolume.CubicMetersPerKilogram); } - /// Get from / . - public static MassFlow operator /(Mass mass, TimeSpan timeSpan) + /// Get from / . + public static Volume operator /(Mass mass, Density density) { - return MassFlow.FromKilogramsPerSecond(mass.Kilograms / timeSpan.TotalSeconds); + return Volume.FromCubicMeters(mass.Kilograms / density.KilogramsPerCubicMeter); } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs index 1d9487240c..c154a74bbe 100644 --- a/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MassFlow.g.cs @@ -45,12 +45,12 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, - IMultiplyOperators, IDivisionOperators, - IDivisionOperators, + IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, + IDivisionOperators, IDivisionOperators, - IMultiplyOperators, #endif IComparable, IComparable, @@ -1040,22 +1040,28 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out MassF return Density.FromKilogramsPerCubicMeter(massFlow.KilogramsPerSecond / volumeFlow.CubicMetersPerSecond); } + /// Get from / . + public static MassFlux operator /(MassFlow massFlow, Area area) + { + return MassFlux.FromKilogramsPerSecondPerSquareMeter(massFlow.KilogramsPerSecond / area.SquareMeters); + } + /// Get from * . public static Mass operator *(MassFlow massFlow, Duration duration) { return Mass.FromKilograms(massFlow.KilogramsPerSecond * duration.Seconds); } - /// Get from / . - public static MassFlux operator /(MassFlow massFlow, Area area) + /// Get from * . + public static Mass operator *(MassFlow massFlow, TimeSpan timeSpan) { - return MassFlux.FromKilogramsPerSecondPerSquareMeter(massFlow.KilogramsPerSecond / area.SquareMeters); + return Mass.FromKilograms(massFlow.KilogramsPerSecond * timeSpan.TotalSeconds); } - /// Get from / . - public static Power operator /(MassFlow massFlow, BrakeSpecificFuelConsumption brakeSpecificFuelConsumption) + /// Get from * . + public static Mass operator *(TimeSpan timeSpan, MassFlow massFlow) { - return Power.FromWatts(massFlow.KilogramsPerSecond / brakeSpecificFuelConsumption.KilogramsPerJoule); + return Mass.FromKilograms(timeSpan.TotalSeconds * massFlow.KilogramsPerSecond); } /// Get from * . @@ -1064,22 +1070,16 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out MassF return Power.FromWatts(massFlow.KilogramsPerSecond * specificEnergy.JoulesPerKilogram); } - /// Get from / . - public static VolumeFlow operator /(MassFlow massFlow, Density density) - { - return VolumeFlow.FromCubicMetersPerSecond(massFlow.KilogramsPerSecond / density.KilogramsPerCubicMeter); - } - - /// Get from * . - public static Mass operator *(MassFlow massFlow, TimeSpan timeSpan) + /// Get from / . + public static Power operator /(MassFlow massFlow, BrakeSpecificFuelConsumption brakeSpecificFuelConsumption) { - return Mass.FromKilograms(massFlow.KilogramsPerSecond * timeSpan.TotalSeconds); + return Power.FromWatts(massFlow.KilogramsPerSecond / brakeSpecificFuelConsumption.KilogramsPerJoule); } - /// Get from * . - public static Mass operator *(TimeSpan timeSpan, MassFlow massFlow) + /// Get from / . + public static VolumeFlow operator /(MassFlow massFlow, Density density) { - return Mass.FromKilograms(timeSpan.TotalSeconds * massFlow.KilogramsPerSecond); + return VolumeFlow.FromCubicMetersPerSecond(massFlow.KilogramsPerSecond / density.KilogramsPerCubicMeter); } #endregion diff --git a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs index 6a66d0c379..00f765bec9 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarFlow.g.cs @@ -43,9 +43,9 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, IDivisionOperators, - IMultiplyOperators, #endif IComparable, IComparable, @@ -591,18 +591,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Molar return AmountOfSubstance.FromKilomoles(molarFlow.KilomolesPerSecond * duration.Seconds); } - /// Get from * . - public static MassFlow operator *(MolarFlow molarFlow, MolarMass molarMass) - { - return MassFlow.FromKilogramsPerSecond(molarFlow.KilomolesPerSecond * molarMass.KilogramsPerKilomole); - } - - /// Get from / . - public static VolumeFlow operator /(MolarFlow molarFlow, Molarity molarity) - { - return VolumeFlow.FromCubicMetersPerSecond(molarFlow.MolesPerSecond / molarity.MolesPerCubicMeter); - } - /// Get from * . public static AmountOfSubstance operator *(MolarFlow molarFlow, TimeSpan timeSpan) { @@ -615,6 +603,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Molar return AmountOfSubstance.FromKilomoles(timeSpan.TotalSeconds * molarFlow.KilomolesPerSecond); } + /// Get from * . + public static MassFlow operator *(MolarFlow molarFlow, MolarMass molarMass) + { + return MassFlow.FromKilogramsPerSecond(molarFlow.KilomolesPerSecond * molarMass.KilogramsPerKilomole); + } + + /// Get from / . + public static VolumeFlow operator /(MolarFlow molarFlow, Molarity molarity) + { + return VolumeFlow.FromCubicMetersPerSecond(molarFlow.MolesPerSecond / molarity.MolesPerCubicMeter); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs index 3e29004ac2..b35bad827c 100644 --- a/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/MolarMass.g.cs @@ -42,9 +42,9 @@ namespace UnitsNet public readonly partial struct MolarMass : IArithmeticQuantity, #if NET7_0_OR_GREATER - IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -656,12 +656,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Molar #region Relational Operators - /// Get from * . - public static Mass operator *(MolarMass molarMass, AmountOfSubstance amountOfSubstance) - { - return Mass.FromGrams(molarMass.GramsPerMole * amountOfSubstance.Moles); - } - /// Get from * . public static MassConcentration operator *(MolarMass molarMass, Molarity molarity) { @@ -674,6 +668,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Molar return MassFlow.FromKilogramsPerSecond(molarMass.KilogramsPerKilomole * molarFlow.KilomolesPerSecond); } + /// Get from * . + public static Mass operator *(MolarMass molarMass, AmountOfSubstance amountOfSubstance) + { + return Mass.FromGrams(molarMass.GramsPerMole * amountOfSubstance.Moles); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Power.g.cs b/UnitsNet/GeneratedCode/Quantities/Power.g.cs index f074e2a525..475bbbe81e 100644 --- a/UnitsNet/GeneratedCode/Quantities/Power.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Power.g.cs @@ -46,6 +46,7 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IMultiplyOperators, + IMultiplyOperators, IDivisionOperators, IDivisionOperators, IMultiplyOperators, @@ -53,7 +54,6 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, - IMultiplyOperators, #endif IDecimalQuantity, IComparable, @@ -924,6 +924,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Power return Energy.FromJoules((double)power.Watts * duration.Seconds); } + /// Get from * . + public static Energy operator *(Power power, TimeSpan timeSpan) + { + return Energy.FromJoules((double)power.Watts * timeSpan.TotalSeconds); + } + + /// Get from * . + public static Energy operator *(TimeSpan timeSpan, Power power) + { + return Energy.FromJoules(timeSpan.TotalSeconds * (double)power.Watts); + } + /// Get from / . public static Force operator /(Power power, Speed speed) { @@ -966,18 +978,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Power return Torque.FromNewtonMeters((double)power.Watts / rotationalSpeed.RadiansPerSecond); } - /// Get from * . - public static Energy operator *(Power power, TimeSpan timeSpan) - { - return Energy.FromJoules((double)power.Watts * timeSpan.TotalSeconds); - } - - /// Get from * . - public static Energy operator *(TimeSpan timeSpan, Power power) - { - return Energy.FromJoules(timeSpan.TotalSeconds * (double)power.Watts); - } - #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs index 777d8c544d..db3e6c06e9 100644 --- a/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Pressure.g.cs @@ -47,8 +47,8 @@ namespace UnitsNet IDivisionOperators, IDivisionOperators, IDivisionOperators, - IDivisionOperators, IDivisionOperators, + IDivisionOperators, #endif IComparable, IComparable, @@ -1338,18 +1338,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Press return PressureChangeRate.FromPascalsPerSecond(pressure.Pascals / duration.Seconds); } - /// Get from / . - public static SpecificWeight operator /(Pressure pressure, Length length) - { - return SpecificWeight.FromNewtonsPerCubicMeter(pressure.Pascals / length.Meters); - } - /// Get from / . public static PressureChangeRate operator /(Pressure pressure, TimeSpan timeSpan) { return PressureChangeRate.FromPascalsPerSecond(pressure.Pascals / timeSpan.TotalSeconds); } + /// Get from / . + public static SpecificWeight operator /(Pressure pressure, Length length) + { + return SpecificWeight.FromNewtonsPerCubicMeter(pressure.Pascals / length.Meters); + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs index 2c71ec1cbd..74313501ec 100644 --- a/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/SpecificEnergy.g.cs @@ -45,10 +45,10 @@ namespace UnitsNet public readonly partial struct SpecificEnergy : IArithmeticQuantity, #if NET7_0_OR_GREATER - IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -972,12 +972,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Speci return BrakeSpecificFuelConsumption.FromKilogramsPerJoule(value / specificEnergy.JoulesPerKilogram); } - /// Get from * . - public static double operator *(SpecificEnergy specificEnergy, BrakeSpecificFuelConsumption brakeSpecificFuelConsumption) - { - return specificEnergy.JoulesPerKilogram * brakeSpecificFuelConsumption.KilogramsPerJoule; - } - /// Get from * . public static Energy operator *(SpecificEnergy specificEnergy, Mass mass) { @@ -996,6 +990,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Speci return SpecificEntropy.FromJoulesPerKilogramKelvin(specificEnergy.JoulesPerKilogram / temperatureDelta.Kelvins); } + /// Get from * . + public static double operator *(SpecificEnergy specificEnergy, BrakeSpecificFuelConsumption brakeSpecificFuelConsumption) + { + return specificEnergy.JoulesPerKilogram * brakeSpecificFuelConsumption.KilogramsPerJoule; + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs index 4f20de6ffc..2f291ae723 100644 --- a/UnitsNet/GeneratedCode/Quantities/Speed.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/Speed.g.cs @@ -43,15 +43,15 @@ namespace UnitsNet IArithmeticQuantity, #if NET7_0_OR_GREATER IDivisionOperators, + IDivisionOperators, IDivisionOperators, IMultiplyOperators, IMultiplyOperators, + IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, IMultiplyOperators, - IDivisionOperators, - IMultiplyOperators, #endif IComparable, IComparable, @@ -1029,6 +1029,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Speed return Acceleration.FromMetersPerSecondSquared(speed.MetersPerSecond / duration.Seconds); } + /// Get from / . + public static Acceleration operator /(Speed speed, TimeSpan timeSpan) + { + return Acceleration.FromMetersPerSecondSquared(speed.MetersPerSecond / timeSpan.TotalSeconds); + } + /// Get from / . public static Duration operator /(Speed speed, Acceleration acceleration) { @@ -1047,6 +1053,18 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Speed return Length.FromMeters(speed.MetersPerSecond * duration.Seconds); } + /// Get from * . + public static Length operator *(Speed speed, TimeSpan timeSpan) + { + return Length.FromMeters(speed.MetersPerSecond * timeSpan.TotalSeconds); + } + + /// Get from * . + public static Length operator *(TimeSpan timeSpan, Speed speed) + { + return Length.FromMeters(timeSpan.TotalSeconds * speed.MetersPerSecond); + } + /// Get from * . public static MassFlux operator *(Speed speed, Density density) { @@ -1071,24 +1089,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Speed return VolumeFlow.FromCubicMetersPerSecond(speed.MetersPerSecond * area.SquareMeters); } - /// Get from / . - public static Acceleration operator /(Speed speed, TimeSpan timeSpan) - { - return Acceleration.FromMetersPerSecondSquared(speed.MetersPerSecond / timeSpan.TotalSeconds); - } - - /// Get from * . - public static Length operator *(Speed speed, TimeSpan timeSpan) - { - return Length.FromMeters(speed.MetersPerSecond * timeSpan.TotalSeconds); - } - - /// Get from * . - public static Length operator *(TimeSpan timeSpan, Speed speed) - { - return Length.FromMeters(timeSpan.TotalSeconds * speed.MetersPerSecond); - } - #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs index 3519803abd..32c9ae4a4c 100644 --- a/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/TemperatureDelta.g.cs @@ -42,11 +42,11 @@ namespace UnitsNet public readonly partial struct TemperatureDelta : IArithmeticQuantity, #if NET7_0_OR_GREATER - IMultiplyOperators, IMultiplyOperators, IDivisionOperators, IMultiplyOperators, IDivisionOperators, + IMultiplyOperators, #endif IComparable, IComparable, @@ -586,12 +586,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Tempe #region Relational Operators - /// Get from * . - public static double operator *(TemperatureDelta temperatureDelta, CoefficientOfThermalExpansion coefficientOfThermalExpansion) - { - return temperatureDelta.Kelvins * coefficientOfThermalExpansion.PerKelvin; - } - /// Get from * . public static Energy operator *(TemperatureDelta temperatureDelta, Entropy entropy) { @@ -616,6 +610,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Tempe return TemperatureGradient.FromKelvinsPerMeter(temperatureDelta.Kelvins / length.Meters); } + /// Get from * . + public static double operator *(TemperatureDelta temperatureDelta, CoefficientOfThermalExpansion coefficientOfThermalExpansion) + { + return temperatureDelta.Kelvins * coefficientOfThermalExpansion.PerKelvin; + } + #endregion #region Equality / IComparable diff --git a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs index f3eadae85c..9cf7d31375 100644 --- a/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs +++ b/UnitsNet/GeneratedCode/Quantities/VolumeFlow.g.cs @@ -1648,6 +1648,12 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Volum return Speed.FromMetersPerSecond(volumeFlow.CubicMetersPerSecond / area.SquareMeters); } + /// Get from * . + public static Volume operator *(TimeSpan timeSpan, VolumeFlow volumeFlow) + { + return Volume.FromCubicMeters(timeSpan.TotalSeconds * volumeFlow.CubicMetersPerSecond); + } + /// Get from * . public static Volume operator *(VolumeFlow volumeFlow, Duration duration) { @@ -1660,12 +1666,6 @@ public static bool TryParseUnit(string str, IFormatProvider? provider, out Volum return Volume.FromCubicMeters(volumeFlow.CubicMetersPerSecond * timeSpan.TotalSeconds); } - /// Get from * . - public static Volume operator *(TimeSpan timeSpan, VolumeFlow volumeFlow) - { - return Volume.FromCubicMeters(timeSpan.TotalSeconds * volumeFlow.CubicMetersPerSecond); - } - #endregion #region Equality / IComparable