ktsu.Semantics.Quantities.Double
2.9.9
Prefix Reserved
See the version list below for details.
dotnet add package ktsu.Semantics.Quantities.Double --version 2.9.9
NuGet\Install-Package ktsu.Semantics.Quantities.Double -Version 2.9.9
<PackageReference Include="ktsu.Semantics.Quantities.Double" Version="2.9.9" />
<PackageVersion Include="ktsu.Semantics.Quantities.Double" Version="2.9.9" />
<PackageReference Include="ktsu.Semantics.Quantities.Double" />
paket add ktsu.Semantics.Quantities.Double --version 2.9.9
#r "nuget: ktsu.Semantics.Quantities.Double, 2.9.9"
#:package ktsu.Semantics.Quantities.Double@2.9.9
#addin nuget:?package=ktsu.Semantics.Quantities.Double&version=2.9.9
#tool nuget:?package=ktsu.Semantics.Quantities.Double&version=2.9.9
ktsu.Semantics.Quantities.Double
Storage-type aliases that bind every
ktsu.Semantics.Quantitiestype todouble, so you writeMassinstead ofMass<double>, project-wide.
ktsu.Semantics.Quantities.Double is a satellite of ktsu.Semantics.Quantities in the ktsu.Semantics family. Read the core package README first for the quantity API itself.
Introduction
Every quantity in ktsu.Semantics.Quantities is generic over its numeric storage type, so you normally write Mass<double>, Speed<double>, and so on. If a project uses one storage type throughout, that generic argument is noise.
This package is props-only. It ships no assembly, just a buildTransitive props file that injects one C# global-using alias per quantity, binding each open generic type to double. Reference it and you can write Mass, Speed, Force3D with no generic argument, and every quantity resolves to its double form. The aliases are real Mass<double> (and so on), so they interoperate with the entire API with no conversion.
Installing this package also pulls in the matching version of ktsu.Semantics.Quantities as a dependency, so it is the only reference you need.
Installation
Package Manager Console
Install-Package ktsu.Semantics.Quantities.Double
.NET CLI
dotnet add package ktsu.Semantics.Quantities.Double
Package Reference
<PackageReference Include="ktsu.Semantics.Quantities.Double" Version="x.y.z" />
Usage Example
using ktsu.Semantics.Quantities; // types resolve to their double form via the injected aliases
Mass mass = Mass.FromKilogram(10.0);
Speed speed = Speed.FromMeterPerSecond(15.0);
Mass total = mass + Mass.FromKilogram(2.0); // still a Mass<double>, full identity
Force3D f = new() { X = 3.0, Y = 4.0, Z = 0.0 };
ForceMagnitude mag = f.Magnitude(); // 5.0
Under the hood the injected alias looks like this (one line per quantity, roughly 220 in total):
<Using Include="ktsu.Semantics.Quantities.Mass<double>" Alias="Mass" />
Use exactly one storage-type alias package per project
The aliases are project-wide global usings keyed on the bare type name (Mass, Speed, ...). Referencing two flavor packages in the same project would define the same alias name twice (one bound to double, one to another type), which is a compile error. So reference exactly one of:
ktsu.Semantics.Quantities.Double(this package)ktsu.Semantics.Quantities.Floatktsu.Semantics.Quantities.Decimal
A project that genuinely needs mixed storage types should skip the alias packages and reference ktsu.Semantics.Quantities directly, writing the closed generic (Mass<double>) explicitly.
The alias lists are generated from the quantity catalogue by scripts/Generate-AliasProps.ps1 and validated in CI, so they stay in lockstep with the quantities the core package emits.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
License
This project is licensed under the MIT License. See the LICENSE.md file for details.
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- ktsu.Semantics.Quantities (>= 2.9.9)
-
net8.0
- ktsu.Semantics.Quantities (>= 2.9.9)
-
net9.0
- ktsu.Semantics.Quantities (>= 2.9.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.9.14 | 0 | 8/14/2026 |
| 2.9.13 | 0 | 8/14/2026 |
| 2.9.12 | 0 | 8/14/2026 |
| 2.9.11 | 0 | 8/14/2026 |
| 2.9.10 | 0 | 8/14/2026 |
| 2.9.9 | 0 | 8/14/2026 |
| 2.9.8 | 0 | 8/14/2026 |
| 2.9.7 | 0 | 8/14/2026 |
| 2.9.6 | 0 | 8/14/2026 |
| 2.9.5 | 0 | 8/14/2026 |
| 2.9.4 | 0 | 8/14/2026 |
| 2.9.3 | 82 | 8/7/2026 |
| 2.9.2 | 95 | 8/6/2026 |
| 2.9.1 | 87 | 8/5/2026 |
| 2.9.0 | 97 | 8/4/2026 |
| 2.8.1 | 110 | 7/31/2026 |
| 2.8.0 | 117 | 7/30/2026 |
| 2.7.11 | 110 | 7/29/2026 |
| 2.7.10 | 101 | 7/28/2026 |
| 2.7.9 | 120 | 7/27/2026 |
## v2.9.9 (patch)
Changes since v2.9.8:
- [patch] S1192: name the literals the generators emit ([@matt-edmondson](https://github.com/matt-edmondson))