SiUnits 0.1.1
This package has a SemVer 2.0.0 package version: 0.1.1+6.
dotnet add package SiUnits --version 0.1.1
NuGet\Install-Package SiUnits -Version 0.1.1
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="SiUnits" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SiUnits --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SiUnits, 0.1.1"
#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.
// Install SiUnits as a Cake Addin #addin nuget:?package=SiUnits&version=0.1.1 // Install SiUnits as a Cake Tool #tool nuget:?package=SiUnits&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SiUnits
Getting Started
using Units = SiUnits.Factor<double>;
...
var len = 10 * Units.Length.Meter;
var speed = 10 * (Units)"m/s"; // Create a variable containing a speed.
var distance = 2 * (Units)"kilometer"; // Create a variable containing a distance.
var time = distance / speed; // Divide the distance by the speed to obtain a total time.
var timeInSeconds = time / (Units)"second"; // Divide the time by the desired units to obtain a constant.
// Returns 200.0
The parser supports many arbitrary forms for units, for example, the following are all equivalent:
kilometer / second
km/s
10^3 m s^-1
1/(10^-3*m^-1*s)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Pegasus (>= 4.1.0)
- System.Collections.Immutable (>= 7.0.0)
- System.Runtime.Experimental (>= 6.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.