ktsu.Semantics.Quantities.Double 6.0.0

Prefix Reserved
dotnet add package ktsu.Semantics.Quantities.Double --version 6.0.0
                    
NuGet\Install-Package ktsu.Semantics.Quantities.Double -Version 6.0.0
                    
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="6.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ktsu.Semantics.Quantities.Double" Version="6.0.0" />
                    
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 6.0.0
                    
#r "nuget: ktsu.Semantics.Quantities.Double, 6.0.0"
                    
#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@6.0.0
                    
#: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=6.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ktsu.Semantics.Quantities.Double&version=6.0.0
                    
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 build 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 binding applies to the project that declares the PackageReference, and to no other. The props ship in the package's build/ folder rather than buildTransitive/, so they are not inherited by projects that reference this project. An application assembled from several projects, each wrapping a different storage type, therefore compiles: each project that wants aliases references its own alias package, and no project collects a binding it never asked for. Earlier versions shipped the props in buildTransitive/, where the binding did flow downstream and two of them in one dependency graph produced a wall of CS1537 against a generated file the author never wrote; PrivateAssets="all" on the alias reference was the workaround for that, and is no longer needed.

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
6.0.0 0 11/11/2026
5.12.1 529 10/12/2026
5.12.0 173 10/11/2026
5.11.6 150 10/10/2026
5.11.5 146 10/9/2026
5.11.4 140 10/9/2026
5.11.3 204 10/8/2026
5.11.2 377 10/6/2026
5.11.1 144 10/6/2026
5.11.1-pre.1 118 10/5/2026
5.11.0 177 10/2/2026
5.10.0 165 9/30/2026
5.9.0 150 9/29/2026
5.8.5 156 9/29/2026
5.8.4 144 9/29/2026
5.8.3 170 9/28/2026
5.8.2 168 9/28/2026
5.8.1 157 9/28/2026
5.8.0 168 9/25/2026
5.7.0 166 9/24/2026
Loading failed

## v6.0.0 (major)

Changes since v5.0.0:

- Return the exact floor from 3D and 4D Hypot for 32-bit and narrower integers [patch] (#538) (matt-edmondson)
- Drop the "." parent when DirectoryPath's / operators combine [patch] (#540) (matt-edmondson)
- Ignore a trailing dot in FullFileExtension, as FileExtension does [patch] (#544) (matt-edmondson)
- Make the README vector and identifier examples compile, and test them [patch] (#546) (matt-edmondson)
- Add a SessionStart hook for Claude Code cloud sessions (#483) (matt-edmondson)
- Reject undefined enum values in the Pitch, PitchClass and Section factories [patch] (#535) (matt-edmondson)
- Throw DivideByZeroException from Divide\<TResult\> on a zero divisor [patch] (#534) (matt-edmondson)
- Count a minor key's vii° and vii°7 as diatonic dominants [patch] (#529) (matt-edmondson)
- Interpolate MixOklab, Lerp and Gradient premultiplied, so a transparent end adds no color [minor] (#528) (matt-edmondson)
- Return the exact floor from Sqrt and Hypot for 64-bit and 128-bit integers (#524) (matt-edmondson)
- Order benchmark history by SemVer precedence, so a prerelease charts before its release (#523) (matt-edmondson)
- Add CompatibilitySuppressions.xml to Color, Cpp, Music and Strings.Identifiers [patch] (#519) (matt-edmondson)
- Darken rather than invert a color already darker than the background in AdjustForContrast [patch] (#509) (matt-edmondson)
- Name the starting directory "." in Parent and a bare file's directory [patch] (#504) (matt-edmondson)
- Return a POH from PH.ToPOH instead of a pOH dressed as a pH [major] (#496) (matt-edmondson)
- Return a DirectoryName from every directory type's Name [major] (Claude)
- Refuse a section header outside the documented grammar (Claude)
- Use [[ ]] in the chart render script (Claude)
- Keep benchmark history's write permission and checkout off untrusted runs (Claude)
- Fail a pull request whose benchmark charts drift from their history (#303) (Claude)
- Start benchmark history from the CI run that published a release (#320) (Claude)
- [major] Strings: WeakString can only be set through Create (#310) (Claude)
- Address code-quality findings: zero pattern, local exception counter, explicit Where (Claude)
- Use the specific MSTest assertions Sonar asks for (Claude)
- Use Path.Join for test fixture paths (Claude)
- [patch] Strings: TryCreate rejects without exceptions; validation attributes and the WeakString setter cached per type (#443, #444) (Claude)
- [patch] C++ prelude: a representation widens implicitly and narrows only explicitly (#451) (Claude)
- [patch] Quantities: overloads forward their base's relationship operators (#456) (Claude)
- [patch] Quantities: constants per field, decimal logs, positive guards, division by zero, scaled vector lengths, bounded roots (Claude)
- Drop a redundant ToString in a test (Claude)
- Map roman-numeral round-trip bodies with Select (Claude)
- Parse music charts strictly and write their bar lines where the bars are [minor] (Claude)
- Spell pentatonic keys against a seven-degree scale, weigh every chord tone in key inference, and detect augmented sixths [patch] (Claude)
- [minor] Color: CSS named colors, alpha-aware contrast, gamut-mapped Oklab mixes (Claude)
- Read C+7, Cmaj7sus4 and lead-sheet groups, voice extended inversions, and keep a chord's body in its roman numeral [patch] (Claude)
- [patch] Resolve dot segments in IsRoot, DirectoryPath.Parent and Depth; skip unrepresentable entries in GetContents (Claude)
- Strip all whitespace from a pasted card number or ISBN [patch] (matt-edmondson)
- Write the root README's progression example in chart syntax [patch] (Claude)
- Yield the empty entry after a trailing separator from the span Split [patch] (Claude)
- Take an odd root of an integer MinValue without recursing forever [patch] (Claude)
- Apply the Windows path character and length rules only on Windows [patch] (Claude)
- Report a [RegexMatch] timeout as a validation failure (matt-edmondson)
- Refuse zero, negative and non-finite input to QFactor (matt-edmondson)
- Reject ISMNs (979-0) as ISBN-13s (matt-edmondson)
- Return Min from NormalizedParameter.Denormalize for a NaN position (matt-edmondson)
- Resolve dot segments before taking an absolute directory's parent (Claude)
- Fold Interval.MinValue without negating it (Claude)
- Move the trailing-line check out of Section.TryParse (Claude)
- Drop a redundant ToString in the arrangement trailing-newline test (Claude)
- Refuse a section line after the progression instead of dropping it (Claude)
- Reject IBAN check digits 00, 01 and 99 (Claude)
- Reject a refused chord modifier even when another modifier follows it [patch] (Claude)
- Return false from Duration.TryParse when the reduced fraction overflows int [patch] (Claude)
- Move the bar-based blues tests to the end of FormTests (Claude)
- Detect a twelve-bar blues by bars, not chord count [patch] (Claude)
- Refuse a form with more distinct sections than letters [patch] (Claude)
- Treat a dotfile as having no extension in RemoveExtension and ChangeExtension [patch] (Claude)
- Keep rejected identifier values out of validation messages [patch] (Claude)
- Reject NaN in Vector0 guards with ArgumentException [patch] (Claude)
- [patch] Resolve . and .. before taking a relative directory's parent (Claude)
- [patch] Keep a path relative when its left operand is empty (Claude)
- [patch] Reject unbalanced or repeated UUID braces and parentheses (Claude)
- Name secondary dominant targets by the mode's own triad [patch] (Claude)
- Escape section labels so ToString round-trips through Parse [patch] (Claude)
- Stop Duration arithmetic from wrapping silently on int overflow [patch] (Claude)
- [minor] Simulate color vision deficiencies at any severity in Semantics.Color (Claude)
- Build expected paths with Path.Join in RelativePathMakeTests (Claude)
- [patch] Compute RelativePath.Make by comparing paths, not URIs (Claude)
- [patch] Keep NormalizedParameter.Normalize in [0, 1] for out-of-domain values and reject empty ranges (Claude)
- [patch] Accept only one declared SectionType name in a section header (Claude)
- [patch] Reject JWT segments outside the unpadded base64url alphabet (Claude)
- [patch] Stop [PrefixAndSuffix] letting the prefix and suffix overlap, and reject empty strings (Claude)
- [patch] Require the 978/979 Bookland prefix on an ISBN-13 (Claude)
- [patch] Spell the raised seventh above a flat seventh as #7, not a lowered tonic (Claude)
- Filter IBAN whitespace with Where instead of an if inside the loop (Claude)
- [patch] Anchor IBAN, UUID and ULID patterns at the true end, and strip all whitespace from an IBAN (Claude)
- [patch] Strip every trailing separator when canonicalizing a path (Claude)
- [patch] Title-case [IsTitleCase] values with invariant rules, not the thread culture (Claude)
- [patch] Stop Pitch octaves wrapping into range, and reject whitespace or '+' in the octave (Claude)
- [patch] Keep Tempo.TryParse from throwing, and reject infinite tempos and non-positive beats (Claude)
- [patch] Reject whitespace in [IsBase64] regardless of total length (Claude)
- [patch] Reject non-hex characters in Color.FromHex with ArgumentException (Claude)
- [patch] Name the aeolian mode once (Claude)
- [patch] Parse "minor" and "natural_minor" as the Aeolian mode (Claude)
- [patch] Spell fully and half-diminished sevenths as vii°7 and viiø7 (Claude)
- Count CRLF once without advancing the loop counter in CountLines (Claude)
- [patch] Count every line break in HasMinimumLines, HasMaximumLines and HasExactLines (Claude)
- Merge main into dependabot/nuget/MSTest.Sdk-4.4.1 (Claude)
- Use a collection expression for the refused subjects in UnkeepableRelationshipTests (Claude)
- Assert the Go fix from ktsu.Coder and sync the SDK's .gitignore (Claude)
- [patch] Skip empty split entries in a loop, and honour TrimEntries and combined options (Claude)
- [patch] Scale Milliliter from the litre, not from cubic metres (Claude)
- [patch] Search only the file name for FileExtension and FullFileExtension (Claude)
- [patch] Keep ".." segments that climb above the start in RelativeDirectoryPath.Normalize (Claude)
- Derive the difference-form offset rule from applyV0Guard instead of an eighth parameter (Claude)
- [minor] Keep Vector0 magnitudes non-negative through unary minus and scalar * and / (Claude)
- Convert temperature differences with the factor alone, without the scale offset [patch] (Claude)
- [minor] Keep the major third in a b5 chord unless a minor third is spelled (Claude)
- Parse CMaj7, CmMaj7 and C°7 as the sevenths they name [patch] (Claude)
- Move CI onto the shared ci-shared.yml pipeline (Claude)
- Match path containment case to the platform and accept paths directly under a root [patch] (matt-edmondson)
- Parse "ionian" as the major mode, so a parsed Ionian key equals C major [patch] (matt-edmondson)
- Say why the quality-word loop body is empty [patch] (Claude)
- Strip the quality words without the netstandard2.0-missing Replace overload [patch] (Claude)
- Read C69, Cadd11 and Cadd13 as added tones, and reject leftover text [patch] (Claude)
- Let AdjustForContrast darken on mid-tone backgrounds [patch] (Claude)
- Assert reflexivity against a second instance, not the same reference (Claude)
- Compare semantic strings ordinally, matching their ordinal Equals (Claude)
- Add KilometerPerSecond, the unit orbital state vectors are quoted in (Claude)
- Say why precision.json omits PreciseNumber, and what adding a storage type means [patch] (matt-edmondson)
- Parse dimmaj7 as a diminished-major seventh, not a dim7 (Claude)
- Build a vector in the unit the caller thinks in, not raw SI [minor] (matt-edmondson)
- Keep a path's equality and hash code stable when a derived property is read [patch] (Claude)
- Regenerate SpecificAngularMomentum3D after merging main [patch] (Claude)
- Merge remote-tracking branch 'origin/main' into claude/semantics-240-orbital-dimensions (Claude)
- State the double-precision cost of a logarithmic conversion in its own docs [patch] (matt-edmondson)
- Use Assert.IsLessThan for the negative-energy assertion [patch] (Claude)
- Answer vector magnitude and distance with the dimension, not a bare T [minor] (Claude)
- Add GravitationalParameter, SpecificEnergy and SpecificAngularMomentum [minor] (Claude)
- Ship the storage-type alias props in build/, not buildTransitive/ [patch] (matt-edmondson)
- Merge main into the strings and paths benchmark work (matt-edmondson)
- Fix whole-branch review findings in benchmark docs [patch] (matt-edmondson)
- Fix review findings: bullet count and heading nesting (matt-edmondson)
- Document the strings and paths benchmarks [patch] (matt-edmondson)
- Backfill the strings and paths histories (matt-edmondson)
- Seed the strings and paths histories at 5.3.4 (matt-edmondson)
- Record what the validation ladder actually measured (matt-edmondson)
- Redirect stdin from /dev/null in the subject loops (matt-edmondson)
- Measure three subjects per run (matt-edmondson)
- Fix strings XML doc to describe HashCode, not CompareTo (matt-edmondson)
- Describe the panel the strings chart actually draws (matt-edmondson)
- Explain the Create ratio's outlier size in the source, not just the report (matt-edmondson)
- Draw the strings and paths charts (matt-edmondson)
- Pair the path types against System.IO.Path (matt-edmondson)
- Declare the relative path specimen as a const (matt-edmondson)
- Make RelativeFile a const, not a suppressed readonly field (matt-edmondson)
- Measure the path types, building and operating (matt-edmondson)
- Fix Ordering baseline to match the culture-sensitive comparison it pairs against (matt-edmondson)
- Compare like with like in the string ordering pair (matt-edmondson)
- Pair the string types against hand-written validation (matt-edmondson)
- Chart GetHashCode rather than CompareTo for strings (matt-edmondson)
- Measure a semantic string after it exists (matt-edmondson)
- Correct the expected cost of the two string failure paths (matt-edmondson)
- Measure creating a semantic string across the validation ladder (matt-edmondson)
- Make the release chart renderer subject-aware (matt-edmondson)
- Plan the strings and paths benchmark work (matt-edmondson)
- Design the benchmark history and charts for strings and paths (matt-edmondson)
- State the strict-floor rule once, and pin it [patch] (Claude)
- Refuse to label scale degrees the roman numerals cannot spell [patch] (Claude)
- Read "C6/9" as a six-nine chord, not a slash bass [patch] (Claude)
- Split the root loop into its two disciplines [patch] (Claude)
- Make StorageMath public, and add Cbrt, RootN and Hypot [minor] (Claude)
- Seed the abstraction-cost pair across every release [patch] (Claude)
- Compile the abstraction-cost benchmark against pre-4.0 quantities [patch] (Claude)
- Chart the quantity wrapper's cost per release [patch] (Claude)
- Measure the quantity types against the bare storage type [patch] (Claude)
- Build the source generator once, not twice into one directory [patch] (Claude)
- Seed the chart with every release the suite can measure [patch] (Claude)
- Chart performance per release, and show it in the README [patch] (Claude)
- Gate Dependabot auto-merge on CI actually being green (Claude)
- Decide whose PR it is from the API, not the event payload [patch] (matt-edmondson)
- Assert the Python projection fix the pin caught [patch] (matt-edmondson)
- Merge Dependabot PRs when CI is green, not when nothing is required [patch] (matt-edmondson)
- Add a PreciseNumber storage-type alias package [minor] (Claude)
- [patch] Address code quality findings on the storage conversion fixes (Claude)
- [patch] Fix storage conversion regressions from exact factors (matt-edmondson)
- Decide relative path validity from the string, not the working directory [patch] (matt-edmondson)
- ci: adopt the consolidated .NET workflow [patch] (Claude)
- [minor] Convert units exactly for every storage type (matt-edmondson)
- Repair a doc comment my own edit garbled (Claude)
- Find out whether the quantities reach seven languages, not two (Claude)
- Report the dimension that has exponents when two claim a unit [patch] (Claude)