pkar.Physic1451 1.0.0

Prefix Reserved
dotnet add package pkar.Physic1451 --version 1.0.0
                    
NuGet\Install-Package pkar.Physic1451 -Version 1.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="pkar.Physic1451" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pkar.Physic1451" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="pkar.Physic1451" />
                    
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 pkar.Physic1451 --version 1.0.0
                    
#r "nuget: pkar.Physic1451, 1.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 pkar.Physic1451@1.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=pkar.Physic1451&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=pkar.Physic1451&version=1.0.0
                    
Install as a Cake Tool

This Nuget provides you useful types for various physic calculations. It is based on IEEE 1451.0 Physical Units (clause 4.11 in 2006 version, clause 4.13 in 2023 version) structure, which is based on Hamilton, Bruce, “A Compact Representation of Physical Units” Hewlett-Packard Company, Palo Alto, California, Hewlett-Packard Laboratories Technical Report HPL-96-61, 1995.

In physics, we have no numbers as numbers - every number has unit. It is not "5", but "5 meters", "5 seconds", "5 amperes", "5 billion years", etc. Each calculation is done in two steps: (1) calculate number, and (2) calculate units. Now, you can make your own value calculation using e.g. double type, and calculate units using this Nuget.

Class Units

To use, first you should create new Units object. It can be done in several ways:

UnitsForYourVariable = Meter	// and now UnitsForYourVariable is Meter
UnitsForYourVariable = Meter(2)	// and now UnitsForYourVariable is m²
UnitsForYourVariable = SquareMeter // same as above

For SI derived units, you have many options available:

UnitsForYourVariable = Volt
UnitsForYourVariable = Watt / Ampere
UnitsForYourVariable = Meter(2) * Kilogram() * Second(-3) * Ampere(-1)
UnitsForYourVariable = new Units(0, 0, 2, 1, -3, -1, 0, 0, 0)

You can also use general constructors:

New(_radians , _steradians , _meters , _kilograms , _seconds , _amperes , _kelvins , _moles , _candels )

There are four operators defined: multiply (*), divide (-), equals (=) and differs (not equal, <> or !=).

You can also test if one unit "is inside" second unit, e.g. if Amper has meters:

value.Contains(value2)	// Check if units in value2 are used in value1; and sign of unit powers should be same (second is not inside Volt, but Hertz is)
value.AbsContains(value2) // Check if units in value2 are used in value1; and sign of unit can be either positive or negative (both Hertz and second are inside V)

Class PhysicalValu

It is simply value with units. You have two constructors:

  Public Sub New(_value As Double, _unit As Units)
  Public Sub New(_value As Double, _unit As UnitEnum)  // this one can convert from CGS etc. to SI units

There are six operators defined: multiply (*), divide (-), add (+), subtract (-), equals (=) and differs (not equal, <> or !=).

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.4 is compatible.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in 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
1.0.0 81 8/31/2026