ktsu.Semantics.Quantities.Double 2.9.4

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ktsu.Semantics.Quantities.Double --version 2.9.4
                    
NuGet\Install-Package ktsu.Semantics.Quantities.Double -Version 2.9.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ktsu.Semantics.Quantities.Double" Version="2.9.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ktsu.Semantics.Quantities.Double" Version="2.9.4" />
                    
Directory.Packages.props
<PackageReference Include="ktsu.Semantics.Quantities.Double" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ktsu.Semantics.Quantities.Double --version 2.9.4
                    
#r "nuget: ktsu.Semantics.Quantities.Double, 2.9.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ktsu.Semantics.Quantities.Double@2.9.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ktsu.Semantics.Quantities.Double&version=2.9.4
                    
Install as a Cake Addin
#tool nuget:?package=ktsu.Semantics.Quantities.Double&version=2.9.4
                    
Install as a Cake Tool

ktsu.Semantics.Quantities.Double

Storage-type aliases that bind every ktsu.Semantics.Quantities type to double, so you write Mass instead of Mass<double>, project-wide.

License NuGet Version NuGet Version NuGet Downloads GitHub commit activity GitHub contributors GitHub Actions Workflow Status

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&lt;double&gt;" 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:

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.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.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
2.7.8 119 7/24/2026
Loading failed

## v2.9.4 (patch)

Changes since v2.9.3:

- [patch] Fold the generator tests into Semantics.Test so their coverage is collected ([@matt-edmondson](https://github.com/matt-edmondson))
- [patch] Add source generator tests to cover the generator pipeline ([@matt-edmondson](https://github.com/matt-edmondson))
- [patch] MSTEST0037: use the intent-revealing assertions ([@matt-edmondson](https://github.com/matt-edmondson))
- [patch] MSTEST0068: CollectionAssert.AreEqual -> Assert.AreSequenceEqual ([@matt-edmondson](https://github.com/matt-edmondson))
- [patch] Migrate file headers to the one-line ktsu-dev form ([@matt-edmondson](https://github.com/matt-edmondson))
- [patch] Fix SonarCloud BLOCKER issues in test suite ([@matt-edmondson](https://github.com/matt-edmondson))
- Sync .serena\.gitignore ([@KtsuTools](https://github.com/KtsuTools))
- Sync .runsettings ([@KtsuTools](https://github.com/KtsuTools))
- Sync .editorconfig ([@KtsuTools](https://github.com/KtsuTools))
- Sync .gitattributes ([@KtsuTools](https://github.com/KtsuTools))
- Sync global.json ([@KtsuTools](https://github.com/KtsuTools))