diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.ConversionsGenerator/ConversionConstants.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.ConversionsGenerator/ConversionConstants.g.cs
index b007a3e..accf11b 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.ConversionsGenerator/ConversionConstants.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.ConversionsGenerator/ConversionConstants.g.cs
@@ -25,6 +25,9 @@ internal static class ConversionConstants{
/// Angstrom to meter conversion: 1e-10 m/Å (exact by definition)
internal const double AngstromToMeters = 1e-10;
+ /// Nautical mile to meter conversion: 1852 m/nmi (exact by definition)
+ internal const double NauticalMileToMeters = 1852;
+
/// Pound mass to kilogram: 0.453592 kg/lb (exact)
internal const double PoundMassToKilogram = 0.453592;
@@ -37,12 +40,42 @@ internal static class ConversionConstants{
/// Metric ton to kilogram conversion: 1000 kg/t (exact by definition)
internal const double TonToKilograms = 1000;
+ /// Stone to kilogram conversion: 6.35029318 kg/st (14 lb, exact)
+ internal const double StoneToKilograms = 6.35029318;
+
+ /// Short ton to kilogram conversion: 907.18474 kg/ton (2000 lb, exact)
+ internal const double ShortTonToKilograms = 907.18474;
+
+ /// Atomic mass unit to kilogram: 1.66053906660e-27 kg/u (2018 CODATA)
+ internal const double AtomicMassUnitToKilograms = 1.66053906660e-27;
+
/// Liter to cubic meter conversion: 0.001 m³/L (exact by definition)
internal const double LiterToCubicMeters = 0.001;
/// US gallon to cubic meter conversion: 0.003785411784 m³/gal (exact)
internal const double GallonToCubicMeters = 0.003785411784;
+ /// Cubic centimeter to cubic meter: 1e-6 m³/cm³ (exact by definition)
+ internal const double CubicCentimeterToCubicMeters = 1e-6;
+
+ /// Cubic foot to cubic meter: 0.028316846592 m³/ft³ (exact)
+ internal const double CubicFootToCubicMeters = 0.028316846592;
+
+ /// Cubic inch to cubic meter: 1.6387064e-5 m³/in³ (exact)
+ internal const double CubicInchToCubicMeters = 1.6387064e-5;
+
+ /// Imperial gallon to cubic meter: 0.00454609 m³/imp gal (exact by definition)
+ internal const double ImperialGallonToCubicMeters = 0.00454609;
+
+ /// US liquid quart to cubic meter: 0.000946352946 m³/qt (exact)
+ internal const double USQuartToCubicMeters = 0.000946352946;
+
+ /// US liquid pint to cubic meter: 0.000473176473 m³/pt (exact)
+ internal const double USPintToCubicMeters = 0.000473176473;
+
+ /// US fluid ounce to cubic meter: 2.95735295625e-5 m³/fl oz (exact)
+ internal const double USFluidOunceToCubicMeters = 2.95735295625e-5;
+
/// Minute to second conversion: 60 s/min (exact)
internal const double MinuteToSeconds = 60;
@@ -55,18 +88,27 @@ internal static class ConversionConstants{
/// Year to second conversion: 31557600 s/year (365.25 days, exact)
internal const double YearToSeconds = 31557600;
+ /// Week to second conversion: 604800 s/wk (exact)
+ internal const double WeekToSeconds = 604800;
+
/// Celsius to Kelvin temperature offset: 273.15 K (exact by definition)
internal const double CelsiusToKelvinOffset = 273.15;
- /// Fahrenheit degree scale factor: 9/5 = 1.8 (exact)
- internal const double FahrenheitScale = 1.8;
+ /// Fahrenheit-to-Kelvin degree scale factor: 5/9 (exact)
+ internal const double FahrenheitScale = 0.5555555555555556;
- /// Fahrenheit to Kelvin absolute offset: -459.67 K (exact)
- internal const double FahrenheitToKelvinOffset = -459.67;
+ /// Fahrenheit to Kelvin affine offset: 459.67 × 5/9 ≈ 255.372 K (exact)
+ internal const double FahrenheitToKelvinOffset = 255.37222222222223;
/// Degree to radian conversion: π/180 rad/° (exact)
internal const double DegreeToRadians = 0.017453292519943295769236907684886127134428718885417254560971914401710091146034494436822415696345097379101040706699150667990539631694451077627806983;
+ /// Gradian to radian conversion: π/200 rad/grad (exact)
+ internal const double GradianToRadians = 0.015707963267948966;
+
+ /// Revolution to radian conversion: 2π rad/rev (exact)
+ internal const double RevolutionToRadians = 6.283185307179586;
+
/// Calorie to joule conversion: 4.184 J/cal (exact, thermochemical calorie)
internal const double CalorieToJoules = 4.184;
@@ -79,6 +121,18 @@ internal static class ConversionConstants{
/// Electron volt to joule conversion: 1.602176634e-19 J/eV (exact, based on elementary charge)
internal const double ElectronVoltToJoules = 1.602176634e-19;
+ /// Kilocalorie to joule conversion: 4184 J/kcal (exact, thermochemical)
+ internal const double KilocalorieToJoules = 4184;
+
+ /// Watt-hour to joule conversion: 3600 J/Wh (exact)
+ internal const double WattHourToJoules = 3600;
+
+ /// Erg to joule conversion: 1e-7 J/erg (exact by definition)
+ internal const double ErgToJoules = 1e-7;
+
+ /// British thermal unit (IT) to joule conversion: 1055.05585262 J/BTU (exact)
+ internal const double BtuToJoules = 1055.05585262;
+
/// Bar to pascal conversion: 100000 Pa/bar (exact by definition)
internal const double BarToPascals = 100000;
@@ -88,6 +142,9 @@ internal static class ConversionConstants{
/// PSI to pascal conversion: 6894.757293168361 Pa/psi (exact)
internal const double PsiToPascals = 6894.757293168361;
+ /// Torr to pascal conversion: 101325/760 ≈ 133.322 Pa/Torr (exact)
+ internal const double TorrToPascals = 133.32236842105263;
+
/// Square foot to square meter conversion: 0.09290304 m²/ft² (exact)
internal const double SquareFootToSquareMeters = 0.09290304;
@@ -97,12 +154,33 @@ internal static class ConversionConstants{
/// Barn to square meter conversion: 1e-28 m² (exact by definition)
internal const double BarnToSquareMeters = 1e-28;
+ /// Square kilometer to square meter: 1e6 m²/km² (exact by definition)
+ internal const double SquareKilometerToSquareMeters = 1e6;
+
+ /// Square centimeter to square meter: 1e-4 m²/cm² (exact by definition)
+ internal const double SquareCentimeterToSquareMeters = 1e-4;
+
+ /// Square mile to square meter: 2589988.110336 m²/mi² (exact)
+ internal const double SquareMileToSquareMeters = 2589988.110336;
+
+ /// Hectare to square meter: 10000 m²/ha (exact by definition)
+ internal const double HectareToSquareMeters = 10000;
+
+ /// Acre to square meter: 4046.8564224 m²/ac (exact)
+ internal const double AcreToSquareMeters = 4046.8564224;
+
/// Kilometers per hour to meters per second conversion: 0.2777777777777778 m/s per km/h (exact)
internal const double KilometersPerHourToMetersPerSecond = 0.2777777777777778;
/// Miles per hour to meters per second conversion: 0.44704 m/s per mph (exact)
internal const double MilesPerHourToMetersPerSecond = 0.44704;
+ /// Feet per second to meters per second: 0.3048 m/s per ft/s (exact)
+ internal const double FeetPerSecondToMetersPerSecond = 0.3048;
+
+ /// Knot to meters per second: 1852/3600 ≈ 0.514444 m/s per kn (exact)
+ internal const double KnotToMetersPerSecond = 0.5144444444444445;
+
/// RPM to rad/s conversion: π/30 rad/s per rpm (exact)
internal const double RevolutionsPerMinuteToRadiansPerSecond = 0.10471975511965977;
@@ -112,6 +190,12 @@ internal static class ConversionConstants{
/// Molar to cubic meter concentration conversion: 1000.0 mol/m³ per mol/L (exact)
internal const double MolarToCubicMeter = 1000.0;
+ /// Millimolar to mole per cubic meter: 1 mol/m³ per mM (exact)
+ internal const double MillimolarToMolePerCubicMeter = 1.0;
+
+ /// Micromolar to mole per cubic meter: 0.001 mol/m³ per μM (exact)
+ internal const double MicromolarToMolePerCubicMeter = 0.001;
+
/// Stokes to square meter per second: 1e-4 m²/s per St (exact by definition)
internal const double StokesToSquareMeterPerSecond = 1e-4;
@@ -121,14 +205,68 @@ internal static class ConversionConstants{
/// Liter per second to cubic meter per second: 0.001 m³/s per L/s (exact by definition)
internal const double LiterPerSecondToCubicMeterPerSecond = 0.001;
+ /// Centipoise to pascal second: 0.001 Pa·s per cP (exact by definition)
+ internal const double CentipoiseToPascalSecond = 0.001;
+
+ /// Dyne per centimeter to newton per meter: 0.001 N/m per dyn/cm (exact)
+ internal const double DynePerCentimeterToNewtonPerMeter = 0.001;
+
+ /// Gram per cubic centimeter to kilogram per cubic meter: 1000 kg/m³ per g/cm³ (exact)
+ internal const double GramPerCubicCentimeterToKilogramPerCubicMeter = 1000;
+
+ /// Gram per liter to kilogram per cubic meter: 1 kg/m³ per g/L (exact)
+ internal const double GramPerLiterToKilogramPerCubicMeter = 1.0;
+
/// Gauss to Tesla: 1e-4 T per G (exact by definition)
internal const double GaussToTesla = 1e-4;
+ /// Ampere-hour to coulomb conversion: 3600 C/Ah (exact)
+ internal const double AmpereHourToCoulombs = 3600;
+
/// Gram per mole to kilogram per mole: 0.001 kg/mol per g/mol (exact by definition)
internal const double GramPerMoleToKilogramPerMole = 0.001;
/// Kilojoule per mole to joule per mole: 1000 J/mol per kJ/mol (exact by definition)
internal const double KilojoulePerMoleToJoulePerMole = 1000;
+ /// Calorie per mole to joule per mole: 4.184 J/mol per cal/mol (exact, thermochemical)
+ internal const double CaloriePerMoleToJoulePerMole = 4.184;
+
+ /// Enzyme unit (1 μmol/min) to katal: 1/6e7 ≈ 1.6667e-8 kat/U (exact)
+ internal const double EnzymeUnitToKatals = 1.6666666666666667e-8;
+
+ /// Standard gravity to meters per second squared: 9.80665 m/s² per g (exact by definition)
+ internal const double StandardGravityToMetersPerSecondSquared = 9.80665;
+
+ /// Dyne to newton conversion: 1e-5 N/dyn (exact by definition)
+ internal const double DyneToNewtons = 1e-5;
+
+ /// Pound-force to newton conversion: 4.4482216152605 N/lbf (exact)
+ internal const double PoundForceToNewtons = 4.4482216152605;
+
+ /// Curie to becquerel conversion: 3.7e10 Bq/Ci (exact by definition)
+ internal const double CurieToBecquerels = 3.7e10;
+
+ /// Rad to gray conversion: 0.01 Gy/rad (exact by definition)
+ internal const double RadToGrays = 0.01;
+
+ /// Rem to sievert conversion: 0.01 Sv/rem (exact by definition)
+ internal const double RemToSieverts = 0.01;
+
+ /// Roentgen to coulomb per kilogram: 2.58e-4 C/kg per R (exact by definition)
+ internal const double RoentgenToCoulombsPerKilogram = 2.58e-4;
+
+ /// Foot-candle to lux conversion: 1/0.09290304 ≈ 10.7639 lx/fc (exact)
+ internal const double FootCandleToLux = 10.763910416709722;
+
+ /// Parts per million to ratio: 1e-6 (exact by definition)
+ internal const double PartsPerMillionToRatio = 1e-6;
+
+ /// Parts per billion to ratio: 1e-9 (exact by definition)
+ internal const double PartsPerBillionToRatio = 1e-9;
+
+ /// Percent by weight to mass-fraction ratio: 0.01 (exact by definition)
+ internal const double PercentByWeightToRatio = 0.01;
+
};
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.PhysicalConstantsGenerator/PhysicalConstants.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.PhysicalConstantsGenerator/PhysicalConstants.g.cs
index f2bd10d..01327fe 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.PhysicalConstantsGenerator/PhysicalConstants.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.PhysicalConstantsGenerator/PhysicalConstants.g.cs
@@ -15,6 +15,24 @@ namespace ktsu.Semantics.Quantities;
///
public static class PhysicalConstants{
+ ///
+ /// The physics of sound and vibration, including wave propagation, acoustic properties, sound intensity, frequency analysis, and audio-related measurements
+ ///
+ public static class Acoustics{
+ /// Reference sound intensity: 1 × 10⁻¹² W/m² (threshold of hearing)
+ public static readonly PreciseNumber ReferenceSoundIntensity = PreciseNumber.Parse("1e-12", CultureInfo.InvariantCulture);
+
+ /// Reference sound power: 1 × 10⁻¹² W
+ public static readonly PreciseNumber ReferenceSoundPower = PreciseNumber.Parse("1e-12", CultureInfo.InvariantCulture);
+
+ /// Reference sound pressure: 20 × 10⁻⁶ Pa (threshold of hearing)
+ public static readonly PreciseNumber ReferenceSoundPressure = PreciseNumber.Parse("20e-6", CultureInfo.InvariantCulture);
+
+ /// Sabine reverberation constant: 0.161 s/m
+ public static readonly PreciseNumber SabineConstant = PreciseNumber.Parse("0.161", CultureInfo.InvariantCulture);
+
+ };
+
///
/// Rotational motion and angular quantities, including angular velocity, angular acceleration, torque, and moment of inertia
///
@@ -63,6 +81,18 @@ public static class ClassicalMechanics{
};
+ ///
+ /// The study of fluids (liquids and gases) in motion and at rest, including fluid properties, flow dynamics, viscosity, pressure, and fluid-structure interactions
+ ///
+ public static class FluidMechanics{
+ /// Standard air density at 15°C and 1 atm: 1.225 kg/m³ (ISO 2533)
+ public static readonly PreciseNumber StandardAirDensity = PreciseNumber.Parse("1.225", CultureInfo.InvariantCulture);
+
+ /// Water surface tension at 20°C: 0.0728 N/m (NIST)
+ public static readonly PreciseNumber WaterSurfaceTension = PreciseNumber.Parse("0.0728", CultureInfo.InvariantCulture);
+
+ };
+
///
/// Basic physical quantities and constants that form the foundation of all other physics domains, including fundamental units like length, mass, time, and universal constants
///
@@ -96,6 +126,27 @@ public static class Fundamental{
};
+ ///
+ /// The study of atomic nuclei, radioactivity, nuclear reactions, decay processes, and radiation interactions with matter
+ ///
+ public static class NuclearPhysics{
+ /// Atomic mass unit: 1.66053906660 × 10⁻²⁷ kg (2018 CODATA)
+ public static readonly PreciseNumber AtomicMassUnit = PreciseNumber.Parse("1.66053906660e-27", CultureInfo.InvariantCulture);
+
+ /// Nuclear magneton: 5.0507837461 × 10⁻²⁷ J/T (2018 CODATA)
+ public static readonly PreciseNumber NuclearMagneton = PreciseNumber.Parse("5.0507837461e-27", CultureInfo.InvariantCulture);
+
+ };
+
+ ///
+ /// The physics of light and optical phenomena, including electromagnetic radiation, photometry, illumination, optical properties, and light-matter interactions
+ ///
+ public static class Optics{
+ /// Luminous efficacy of monochromatic radiation at 540 THz: 683 lm/W (exact, SI defining constant)
+ public static readonly PreciseNumber LuminousEfficacy = PreciseNumber.Parse("683.0", CultureInfo.InvariantCulture);
+
+ };
+
///
/// The physics of heat, temperature, and energy transfer, including thermal properties, heat capacity, entropy, and thermodynamic processes
///
@@ -119,51 +170,69 @@ public static class Thermodynamics{
///
public static class Generic{
/// Gets absolute zero in celsius: 273.15 k (exact by definition) as type T.
- public static T AbsoluteZeroInCelsius() where T : struct, INumber => T.CreateChecked(Thermodynamics.AbsoluteZeroInCelsius);
+ public static T AbsoluteZeroInCelsius() where T : struct, INumber => Thermodynamics.AbsoluteZeroInCelsius.To();
+/// Gets atomic mass unit: 1.66053906660 × 10⁻²⁷ kg (2018 codata) as type T.
+ public static T AtomicMassUnit() where T : struct, INumber => NuclearPhysics.AtomicMassUnit.To();
/// Gets avogadro's number: 6.02214076 × 10²³ entities/mol (exact, si defining constant) as type T.
- public static T AvogadroNumber() where T : struct, INumber => T.CreateChecked(Fundamental.AvogadroNumber);
+ public static T AvogadroNumber() where T : struct, INumber => Fundamental.AvogadroNumber.To();
/// Gets boltzmann constant: 1.380649 × 10⁻²³ j/k (exact, si defining constant) as type T.
- public static T BoltzmannConstant() where T : struct, INumber => T.CreateChecked(Fundamental.BoltzmannConstant);
+ public static T BoltzmannConstant() where T : struct, INumber => Fundamental.BoltzmannConstant.To();
/// Gets degrees per radian: 180/π ≈ 57.29577951308232 as type T.
- public static T DegreesPerRadian() where T : struct, INumber => T.CreateChecked(AngularMechanics.DegreesPerRadian);
+ public static T DegreesPerRadian() where T : struct, INumber => AngularMechanics.DegreesPerRadian.To();
/// Gets elementary charge: 1.602176634 × 10⁻¹⁹ c (exact, si defining constant) as type T.
- public static T ElementaryCharge() where T : struct, INumber => T.CreateChecked(Fundamental.ElementaryCharge);
+ public static T ElementaryCharge() where T : struct, INumber => Fundamental.ElementaryCharge.To();
/// Gets fine structure constant: 7.2973525693 × 10⁻³ (dimensionless, 2018 codata) as type T.
- public static T FineStructureConstant() where T : struct, INumber => T.CreateChecked(Fundamental.FineStructureConstant);
+ public static T FineStructureConstant() where T : struct, INumber => Fundamental.FineStructureConstant.To();
/// Gets gas constant: 8.31446261815324 j/(mol·k) (exact, derived from avogadro and boltzmann constants) as type T.
- public static T GasConstant() where T : struct, INumber => T.CreateChecked(Chemistry.GasConstant);
+ public static T GasConstant() where T : struct, INumber => Chemistry.GasConstant.To();
/// Gets gravitational constant: 6.67430 × 10⁻¹¹ m³/(kg⋅s²) (2018 codata) as type T.
- public static T GravitationalConstant() where T : struct, INumber => T.CreateChecked(Fundamental.GravitationalConstant);
+ public static T GravitationalConstant() where T : struct, INumber => Fundamental.GravitationalConstant.To();
/// Gets natural logarithm of 2: 0.6931471805599453 as type T.
- public static T Ln2() where T : struct, INumber => T.CreateChecked(Chemistry.Ln2);
+ public static T Ln2() where T : struct, INumber => Chemistry.Ln2.To();
+/// Gets luminous efficacy of monochromatic radiation at 540 thz: 683 lm/w (exact, si defining constant) as type T.
+ public static T LuminousEfficacy() where T : struct, INumber => Optics.LuminousEfficacy.To();
/// Gets molar volume of ideal gas at stp: 22.413969545014137 l/mol (calculated from r*t/p at 273.15k, 101325pa) as type T.
- public static T MolarVolumeSTP() where T : struct, INumber => T.CreateChecked(Chemistry.MolarVolumeSTP);
+ public static T MolarVolumeSTP() where T : struct, INumber => Chemistry.MolarVolumeSTP.To();
/// Gets neutral ph value at 25°c: 7.0 as type T.
- public static T NeutralPH() where T : struct, INumber => T.CreateChecked(Chemistry.NeutralPH);
+ public static T NeutralPH() where T : struct, INumber => Chemistry.NeutralPH.To();
+/// Gets nuclear magneton: 5.0507837461 × 10⁻²⁷ j/t (2018 codata) as type T.
+ public static T NuclearMagneton() where T : struct, INumber => NuclearPhysics.NuclearMagneton.To();
/// Gets magnetic permeability of free space: 4π × 10⁻⁷ h/m (exact by definition) as type T.
- public static T PermeabilityOfFreeSpace() where T : struct, INumber => T.CreateChecked(Fundamental.PermeabilityOfFreeSpace);
+ public static T PermeabilityOfFreeSpace() where T : struct, INumber => Fundamental.PermeabilityOfFreeSpace.To();
/// Gets electric permittivity of free space: 8.8541878128 × 10⁻¹² f/m (exact, derived) as type T.
- public static T PermittivityOfFreeSpace() where T : struct, INumber => T.CreateChecked(Fundamental.PermittivityOfFreeSpace);
+ public static T PermittivityOfFreeSpace() where T : struct, INumber => Fundamental.PermittivityOfFreeSpace.To();
/// Gets planck constant: 6.62607015 × 10⁻³⁴ j·s (exact, si defining constant) as type T.
- public static T PlanckConstant() where T : struct, INumber => T.CreateChecked(Fundamental.PlanckConstant);
+ public static T PlanckConstant() where T : struct, INumber => Fundamental.PlanckConstant.To();
/// Gets radians per degree: π/180 ≈ 0.017453292519943295 as type T.
- public static T RadiansPerDegree() where T : struct, INumber => T.CreateChecked(AngularMechanics.RadiansPerDegree);
+ public static T RadiansPerDegree() where T : struct, INumber => AngularMechanics.RadiansPerDegree.To();
+/// Gets reference sound intensity: 1 × 10⁻¹² w/m² (threshold of hearing) as type T.
+ public static T ReferenceSoundIntensity() where T : struct, INumber => Acoustics.ReferenceSoundIntensity.To();
+/// Gets reference sound power: 1 × 10⁻¹² w as type T.
+ public static T ReferenceSoundPower() where T : struct, INumber => Acoustics.ReferenceSoundPower.To();
+/// Gets reference sound pressure: 20 × 10⁻⁶ pa (threshold of hearing) as type T.
+ public static T ReferenceSoundPressure() where T : struct, INumber => Acoustics.ReferenceSoundPressure.To();
+/// Gets sabine reverberation constant: 0.161 s/m as type T.
+ public static T SabineConstant() where T : struct, INumber => Acoustics.SabineConstant.To();
/// Gets speed of light in vacuum: 299,792,458 m/s (exact, si defining constant) as type T.
- public static T SpeedOfLight() where T : struct, INumber => T.CreateChecked(Fundamental.SpeedOfLight);
+ public static T SpeedOfLight() where T : struct, INumber => Fundamental.SpeedOfLight.To();
+/// Gets standard air density at 15°c and 1 atm: 1.225 kg/m³ (iso 2533) as type T.
+ public static T StandardAirDensity() where T : struct, INumber => FluidMechanics.StandardAirDensity.To();
/// Gets standard atmospheric pressure: 101,325 pa (exact by definition) as type T.
- public static T StandardAtmosphericPressure() where T : struct, INumber => T.CreateChecked(ClassicalMechanics.StandardAtmosphericPressure);
+ public static T StandardAtmosphericPressure() where T : struct, INumber => ClassicalMechanics.StandardAtmosphericPressure.To();
/// Gets standard gravitational acceleration: 9.80665 m/s² (exact by definition) as type T.
- public static T StandardGravity() where T : struct, INumber => T.CreateChecked(ClassicalMechanics.StandardGravity);
+ public static T StandardGravity() where T : struct, INumber => ClassicalMechanics.StandardGravity.To();
/// Gets standard temperature (stp): 273.15 k (0°c) as type T.
- public static T StandardTemperature() where T : struct, INumber => T.CreateChecked(Thermodynamics.StandardTemperature);
+ public static T StandardTemperature() where T : struct, INumber => Thermodynamics.StandardTemperature.To();
/// Gets 2π - full rotation in radians: 6.283185307179586 as type T.
- public static T TwoPi() where T : struct, INumber => T.CreateChecked(AngularMechanics.TwoPi);
+ public static T TwoPi() where T : struct, INumber => AngularMechanics.TwoPi.To();
/// Gets water boiling point at 1 atm: 373.15 k (100°c) as type T.
- public static T WaterBoilingPoint() where T : struct, INumber => T.CreateChecked(Thermodynamics.WaterBoilingPoint);
+ public static T WaterBoilingPoint() where T : struct, INumber => Thermodynamics.WaterBoilingPoint.To();
/// Gets water ion product (kw) at 25°c: 1.0 × 10⁻¹⁴ (pkw = 14.0) as type T.
- public static T WaterIonProduct() where T : struct, INumber => T.CreateChecked(Chemistry.WaterIonProduct);
+ public static T WaterIonProduct() where T : struct, INumber => Chemistry.WaterIonProduct.To();
+/// Gets water surface tension at 20°c: 0.0728 n/m (nist) as type T.
+ public static T WaterSurfaceTension() where T : struct, INumber => FluidMechanics.WaterSurfaceTension.To();
/// Gets water triple point: 273.16 k (exact by definition) as type T.
- public static T WaterTriplePoint() where T : struct, INumber => T.CreateChecked(Thermodynamics.WaterTriplePoint);
+ public static T WaterTriplePoint() where T : struct, INumber => Thermodynamics.WaterTriplePoint.To();
};
};
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AbsorbedDose.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AbsorbedDose.g.cs
index c64f718..4c6bdb9 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AbsorbedDose.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AbsorbedDose.g.cs
@@ -27,6 +27,13 @@ public record AbsorbedDose : PhysicalQuantity, T>, IVector0A new instance.
/// Thrown when the resulting magnitude would be negative.
public static AbsorbedDose FromGrays(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new from a value in Rad.
+ ///
+ /// The value in Rad.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AbsorbedDose FromRads(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.RadToGrays)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-AbsorbedDose unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Acceleration1D.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Acceleration1D.g.cs
index e796dc0..79a72d0 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Acceleration1D.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Acceleration1D.g.cs
@@ -26,6 +26,12 @@ public record Acceleration1D : PhysicalQuantity, T>, IVecto
/// The value in MetersPerSecondSquared.
/// A new instance.
public static Acceleration1D FromMetersPerSecondSquared(T value) => Create(value);
+///
+ /// Creates a new from a value in StandardGravity.
+ ///
+ /// The value in StandardGravity.
+ /// A new instance.
+ public static Acceleration1D FromStandardGravity(T value) => Create((value * T.CreateChecked(Units.ConversionConstants.StandardGravityToMetersPerSecondSquared)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Acceleration unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AccelerationMagnitude.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AccelerationMagnitude.g.cs
index 611f74c..d047cf9 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AccelerationMagnitude.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AccelerationMagnitude.g.cs
@@ -27,6 +27,13 @@ public record AccelerationMagnitude : PhysicalQuantityA new instance.
/// Thrown when the resulting magnitude would be negative.
public static AccelerationMagnitude FromMetersPerSecondSquared(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new from a value in StandardGravity.
+ ///
+ /// The value in StandardGravity.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AccelerationMagnitude FromStandardGravity(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.StandardGravityToMetersPerSecondSquared)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Acceleration unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ActivationEnergy.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ActivationEnergy.g.cs
index 561c5d9..7eb88f3 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ActivationEnergy.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ActivationEnergy.g.cs
@@ -35,6 +35,13 @@ public record ActivationEnergy : PhysicalQuantity, T>, IV
/// A new ActivationEnergy instance.
/// Thrown when the resulting magnitude would be negative.
public static ActivationEnergy FromKilojoulePerMole(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.KilojoulePerMoleToJoulePerMole)), nameof(value)));
+///
+ /// Creates a new ActivationEnergy from a value in CaloriePerMole.
+ ///
+ /// The value in CaloriePerMole.
+ /// A new ActivationEnergy instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static ActivationEnergy FromCaloriesPerMole(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.CaloriePerMoleToJoulePerMole)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-MolarEnergy unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Airspeed.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Airspeed.g.cs
index 7f916e4..4e23973 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Airspeed.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Airspeed.g.cs
@@ -42,6 +42,20 @@ public record Airspeed : PhysicalQuantity, T>, IVector0A new Airspeed instance.
/// Thrown when the resulting magnitude would be negative.
public static Airspeed FromMilesPerHour(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.MilesPerHourToMetersPerSecond)), nameof(value)));
+///
+ /// Creates a new Airspeed from a value in FeetPerSecond.
+ ///
+ /// The value in FeetPerSecond.
+ /// A new Airspeed instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Airspeed FromFeetPerSecond(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.FeetPerSecondToMetersPerSecond)), nameof(value)));
+///
+ /// Creates a new Airspeed from a value in Knot.
+ ///
+ /// The value in Knot.
+ /// A new Airspeed instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Airspeed FromKnots(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.KnotToMetersPerSecond)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Velocity unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Altitude.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Altitude.g.cs
index 817ec29..821fb8b 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Altitude.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Altitude.g.cs
@@ -98,6 +98,13 @@ public record Altitude : PhysicalQuantity, T>, IVector0A new Altitude instance.
/// Thrown when the resulting magnitude would be negative.
public static Altitude FromMiles(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.MileToMeters)), nameof(value)));
+///
+ /// Creates a new Altitude from a value in NauticalMile.
+ ///
+ /// The value in NauticalMile.
+ /// A new Altitude instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Altitude FromNauticalMiles(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.NauticalMileToMeters)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Length unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AmountOfSubstance.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AmountOfSubstance.g.cs
index 00d6f87..30f4040 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AmountOfSubstance.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AmountOfSubstance.g.cs
@@ -27,6 +27,20 @@ public record AmountOfSubstance : PhysicalQuantity, T>,
/// A new instance.
/// Thrown when the resulting magnitude would be negative.
public static AmountOfSubstance FromMoles(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new from a value in Kilomole.
+ ///
+ /// The value in Kilomole.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AmountOfSubstance FromKilomoles(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Kilo)), nameof(value)));
+///
+ /// Creates a new from a value in Millimole.
+ ///
+ /// The value in Millimole.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AmountOfSubstance FromMillimoles(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Milli)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-AmountOfSubstance unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Angle.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Angle.g.cs
index d778edd..c3845b5 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Angle.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Angle.g.cs
@@ -34,6 +34,27 @@ public record Angle : PhysicalQuantity, T>, IVector0, T>
/// A new instance.
/// Thrown when the resulting magnitude would be negative.
public static Angle FromDegrees(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.DegreeToRadians)), nameof(value)));
+///
+ /// Creates a new from a value in Gradian.
+ ///
+ /// The value in Gradian.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Angle FromGradians(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.GradianToRadians)), nameof(value)));
+///
+ /// Creates a new from a value in Revolution.
+ ///
+ /// The value in Revolution.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Angle FromRevolutions(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.RevolutionToRadians)), nameof(value)));
+///
+ /// Creates a new from a value in Milliradian.
+ ///
+ /// The value in Milliradian.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Angle FromMilliradians(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Milli)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-AngularDisplacement unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ApertureAngle.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ApertureAngle.g.cs
index 51dc7a0..f1988a2 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ApertureAngle.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ApertureAngle.g.cs
@@ -35,6 +35,27 @@ public record ApertureAngle : PhysicalQuantity, T>, IVector0
/// A new ApertureAngle instance.
/// Thrown when the resulting magnitude would be negative.
public static ApertureAngle FromDegrees(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.DegreeToRadians)), nameof(value)));
+///
+ /// Creates a new ApertureAngle from a value in Gradian.
+ ///
+ /// The value in Gradian.
+ /// A new ApertureAngle instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static ApertureAngle FromGradians(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.GradianToRadians)), nameof(value)));
+///
+ /// Creates a new ApertureAngle from a value in Revolution.
+ ///
+ /// The value in Revolution.
+ /// A new ApertureAngle instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static ApertureAngle FromRevolutions(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.RevolutionToRadians)), nameof(value)));
+///
+ /// Creates a new ApertureAngle from a value in Milliradian.
+ ///
+ /// The value in Milliradian.
+ /// A new ApertureAngle instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static ApertureAngle FromMilliradians(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Milli)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-AngularDisplacement unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Area.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Area.g.cs
index 5460bf6..26ffd39 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Area.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Area.g.cs
@@ -27,6 +27,20 @@ public record Area : PhysicalQuantity, T>, IVector0, T>
/// A new instance.
/// Thrown when the resulting magnitude would be negative.
public static Area FromSquareMeters(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new from a value in SquareKilometer.
+ ///
+ /// The value in SquareKilometer.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Area FromSquareKilometers(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.SquareKilometerToSquareMeters)), nameof(value)));
+///
+ /// Creates a new from a value in SquareCentimeter.
+ ///
+ /// The value in SquareCentimeter.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Area FromSquareCentimeters(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.SquareCentimeterToSquareMeters)), nameof(value)));
///
/// Creates a new from a value in SquareFoot.
///
@@ -41,6 +55,27 @@ public record Area : PhysicalQuantity, T>, IVector0, T>
/// A new instance.
/// Thrown when the resulting magnitude would be negative.
public static Area FromSquareInches(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.SquareInchToSquareMeters)), nameof(value)));
+///
+ /// Creates a new from a value in SquareMile.
+ ///
+ /// The value in SquareMile.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Area FromSquareMiles(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.SquareMileToSquareMeters)), nameof(value)));
+///
+ /// Creates a new from a value in Hectare.
+ ///
+ /// The value in Hectare.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Area FromHectares(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.HectareToSquareMeters)), nameof(value)));
+///
+ /// Creates a new from a value in Acre.
+ ///
+ /// The value in Acre.
+ /// A new instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Area FromAcres(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.AcreToSquareMeters)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Area unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtmosphericPressure.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtmosphericPressure.g.cs
index ba46e30..3197da1 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtmosphericPressure.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtmosphericPressure.g.cs
@@ -28,6 +28,13 @@ public record AtmosphericPressure : PhysicalQuantity,
/// A new AtmosphericPressure instance.
/// Thrown when the resulting magnitude would be negative.
public static AtmosphericPressure FromPascals(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new AtmosphericPressure from a value in Kilopascal.
+ ///
+ /// The value in Kilopascal.
+ /// A new AtmosphericPressure instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AtmosphericPressure FromKilopascals(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Kilo)), nameof(value)));
///
/// Creates a new AtmosphericPressure from a value in Bar.
///
@@ -49,6 +56,13 @@ public record AtmosphericPressure : PhysicalQuantity,
/// A new AtmosphericPressure instance.
/// Thrown when the resulting magnitude would be negative.
public static AtmosphericPressure FromPsi(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.PsiToPascals)), nameof(value)));
+///
+ /// Creates a new AtmosphericPressure from a value in Torr.
+ ///
+ /// The value in Torr.
+ /// A new AtmosphericPressure instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AtmosphericPressure FromTorr(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.TorrToPascals)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Pressure unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtomicMass.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtomicMass.g.cs
index 328bcfa..75e1186 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtomicMass.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtomicMass.g.cs
@@ -56,6 +56,27 @@ public record AtomicMass : PhysicalQuantity, T>, IVector0A new AtomicMass instance.
/// Thrown when the resulting magnitude would be negative.
public static AtomicMass FromOunces(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.OunceToKilograms)), nameof(value)));
+///
+ /// Creates a new AtomicMass from a value in Stone.
+ ///
+ /// The value in Stone.
+ /// A new AtomicMass instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AtomicMass FromStone(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.StoneToKilograms)), nameof(value)));
+///
+ /// Creates a new AtomicMass from a value in ShortTon.
+ ///
+ /// The value in ShortTon.
+ /// A new AtomicMass instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AtomicMass FromShortTons(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.ShortTonToKilograms)), nameof(value)));
+///
+ /// Creates a new AtomicMass from a value in AtomicMassUnit.
+ ///
+ /// The value in AtomicMassUnit.
+ /// A new AtomicMass instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static AtomicMass FromAtomicMassUnits(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.AtomicMassUnitToKilograms)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Mass unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bandwidth.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bandwidth.g.cs
index 271c3d9..0581ace 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bandwidth.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bandwidth.g.cs
@@ -28,6 +28,20 @@ public record Bandwidth : PhysicalQuantity, T>, IVector0A new Bandwidth instance.
/// Thrown when the resulting magnitude would be negative.
public static Bandwidth FromHertz(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new Bandwidth from a value in Kilohertz.
+ ///
+ /// The value in Kilohertz.
+ /// A new Bandwidth instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Bandwidth FromKilohertz(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Kilo)), nameof(value)));
+///
+ /// Creates a new Bandwidth from a value in Megahertz.
+ ///
+ /// The value in Megahertz.
+ /// A new Bandwidth instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static Bandwidth FromMegahertz(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Mega)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Frequency unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bearing.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bearing.g.cs
index c631da2..beb14c5 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bearing.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Bearing.g.cs
@@ -33,6 +33,24 @@ public record Bearing : PhysicalQuantity, T>, IVector1,
/// The value in Degree.
/// A new Bearing instance.
public static Bearing FromDegrees(T value) => Create((value * T.CreateChecked(Units.ConversionConstants.DegreeToRadians)));
+///
+ /// Creates a new Bearing from a value in Gradian.
+ ///
+ /// The value in Gradian.
+ /// A new Bearing instance.
+ public static Bearing FromGradians(T value) => Create((value * T.CreateChecked(Units.ConversionConstants.GradianToRadians)));
+///
+ /// Creates a new Bearing from a value in Revolution.
+ ///
+ /// The value in Revolution.
+ /// A new Bearing instance.
+ public static Bearing FromRevolutions(T value) => Create((value * T.CreateChecked(Units.ConversionConstants.RevolutionToRadians)));
+///
+ /// Creates a new Bearing from a value in Milliradian.
+ ///
+ /// The value in Milliradian.
+ /// A new Bearing instance.
+ public static Bearing FromMilliradians(T value) => Create((value * T.CreateChecked(MetricMagnitudes.Milli)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-AngularDisplacement unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/BulkModulus.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/BulkModulus.g.cs
index 9b3e22c..8b6a759 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/BulkModulus.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/BulkModulus.g.cs
@@ -28,6 +28,13 @@ public record BulkModulus : PhysicalQuantity, T>, IVector0A new BulkModulus instance.
/// Thrown when the resulting magnitude would be negative.
public static BulkModulus FromPascals(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///
+ /// Creates a new BulkModulus from a value in Kilopascal.
+ ///
+ /// The value in Kilopascal.
+ /// A new BulkModulus instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static BulkModulus FromKilopascals(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(MetricMagnitudes.Kilo)), nameof(value)));
///
/// Creates a new BulkModulus from a value in Bar.
///
@@ -49,6 +56,13 @@ public record BulkModulus : PhysicalQuantity, T>, IVector0A new BulkModulus instance.
/// Thrown when the resulting magnitude would be negative.
public static BulkModulus FromPsi(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.PsiToPascals)), nameof(value)));
+///
+ /// Creates a new BulkModulus from a value in Torr.
+ ///
+ /// The value in Torr.
+ /// A new BulkModulus instance.
+ /// Thrown when the resulting magnitude would be negative.
+ public static BulkModulus FromTorr(T value) => Create(Vector0Guards.EnsureNonNegative((value * T.CreateChecked(Units.ConversionConstants.TorrToPascals)), nameof(value)));
///
/// Converts this quantity's SI-base value to the value in .
/// Cross-dimension calls (e.g. passing a non-Pressure unit) fail at compile time.
diff --git a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Capacitance.g.cs b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Capacitance.g.cs
index 7861fdf..919aa15 100644
--- a/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Capacitance.g.cs
+++ b/Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Capacitance.g.cs
@@ -27,6 +27,27 @@ public record Capacitance : PhysicalQuantity, T>, IVector0A new instance.
/// Thrown when the resulting magnitude would be negative.
public static Capacitance FromFarads(T value) => Create(Vector0Guards.EnsureNonNegative(value, nameof(value)));
+///