@@ -6,70 +6,34 @@ The goal of this library is to assist developers with quick proof of concepts as
66
77Feedback and assistance are welcome!
88
9+ ## Documentation
10+
11+ View our docs at https://1eyewonder.github.io/Fs.Units to see the full list of supported units of measure and how to use them.
12+
913## NuGet
1014
11- | Package | Release | Pre-Release | License |
12- | ------- | --------------------------------------------------------------------------------------------------------------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------| --------------------------------------------------------------------------------------------------------------------------------------|
13- | Fs.Units | [ ![ NuGet version (Fs.Units)] ( https://buildstats.info/nuget/Fs.Units )] ( https://www.nuget.org/packages/Fs.Units/ ) | [ ![ NuGet] ( https://buildstats.info/nuget/Fs.Units?includePreReleases=true )] ( https://www.nuget.org/packages/Fs.Units/absoluteLatest ) | [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/1eyewonder/Fs.Units/blob/main/LICENSE.md ) |
14- | Fs.Units.CSharp | [ ![ NuGet version (Fs.Units.CSharp)] ( https://buildstats.info/nuget/Fs.Units.CSharp )] ( https://www.nuget.org/packages/Fs.Units.CSharp/ ) | [ ![ NuGet] ( https://buildstats.info/nuget/Fs.Units.CSharp?includePreReleases=true )] ( https://www.nuget.org/packages/Fs.Units.CSharp/absoluteLatest ) | [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/1eyewonder/Fs.Units/blob/main/LICENSE.md ) |
15+ | Package | Release | Pre-Release | License |
16+ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
17+ | Fs.Units | [ ![ NuGet version (Fs.Units)] ( https://buildstats.info/nuget/Fs.Units )] ( https://www.nuget.org/packages/Fs.Units/ ) | [ ![ NuGet] ( https://buildstats.info/nuget/Fs.Units?includePreReleases=true )] ( https://www.nuget.org/packages/Fs.Units/absoluteLatest ) | [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/1eyewonder/Fs.Units/blob/main/LICENSE.md ) |
18+ | Fs.Units.CSharp | [ ![ NuGet version (Fs.Units.CSharp)] ( https://buildstats.info/nuget/Fs.Units.CSharp )] ( https://www.nuget.org/packages/Fs.Units.CSharp/ ) | [ ![ NuGet] ( https://buildstats.info/nuget/Fs.Units.CSharp?includePreReleases=true )] ( https://www.nuget.org/packages/Fs.Units.CSharp/absoluteLatest ) | [ ![ GitHub license] ( https://img.shields.io/badge/license-MIT-blue.svg )] ( https://github.com/1eyewonder/Fs.Units/blob/main/LICENSE.md ) |
1519
1620## Builds
1721
1822| GitHub Actions |
19- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------: |
23+ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------: |
2024| [ ![ GitHub Actions] ( https://github.com/1eyewonder/Fs.Units/workflows/Build%20main/badge.svg )] ( https://github.com/1eyewonder/Fs.Units/actions?query=branch%3Amain ) |
2125| [ ![ Build History] ( https://buildstats.info/github/chart/1eyewonder/Fs.Units?branch=main )] ( https://github.com/1eyewonder/Fs.Units/actions?query=branch%3Amain ) |
2226
23- ## Table of Contents
24-
25- - [ Fs.Units] ( #fsunits )
26- - [ NuGet] ( #nuget )
27- - [ Builds] ( #builds )
28- - [ Table of Contents] ( #table-of-contents )
29- - [ Unit Types] ( #unit-types )
30- - [ Examples] ( #examples )
31- - [ F#] ( #f )
32- - [ Explicit Conversion Example] ( #explicit-conversion-example )
33- - [ Implicit Conversion Example] ( #implicit-conversion-example )
34- - [ C#] ( #c )
35- - [ Example] ( #example )
36- - [ Supported Unit Categories] ( #supported-unit-categories )
37- - [ Simple] ( #simple )
38- - [ Length] ( #length )
39- - [ Time] ( #time )
40- - [ Mass] ( #mass )
41- - [ Temperature] ( #temperature )
42- - [ Angle] ( #angle )
43- - [ DataStorage] ( #datastorage )
44- - [ Frequency] ( #frequency )
45- - [ Illuminance] ( #illuminance )
46- - [ Current] ( #current )
47- - [ Compound] ( #compound )
48- - [ Area] ( #area )
49- - [ Volume] ( #volume )
50- - [ FuelEconomy] ( #fueleconomy )
51- - [ Inertia] ( #inertia )
52- - [ Speed] ( #speed )
53- - [ Force] ( #force )
54- - [ DataTransferRate] ( #datatransferrate )
55- - [ Density] ( #density )
56- - [ Pressure] ( #pressure )
57- - [ Power] ( #power )
58- - [ Energy] ( #energy )
59- - [ ElectricCharge] ( #electriccharge )
60- - [ ElectromotiveForce] ( #electromotiveforce )
61- - [ Capacitance] ( #capacitance )
62- - [ Inductance] ( #inductance )
6327
6428## Unit Types
6529
6630- ** Simple Units:** A basic unit of measure
6731``` fsharp
68- [<Measure>] type inch
32+ [<Measure>] type inch
6933```
7034- ** Compound Units:** Derived units of measure consisting of combinations of two or more units of measure
7135``` fsharp
72- [<Measure>] type in2 = inch * inch
36+ [<Measure>] type in2 = inch * inch
7337```
7438
7539## Examples
@@ -86,7 +50,7 @@ let valueInFeet = Inch.create 1.0 |> Inch.toFeet // float<ft>
8650
8751#### Implicit Conversion Example
8852
89- For some compound units, implicit conversion is supported. This allows for a more natural syntax.
53+ For some compound units, implicit conversion is supported. This allows for a more natural syntax in certain instances .
9054
9155``` fsharp
9256open Fs.Units
@@ -117,6 +81,7 @@ open Fs.Units.Helpers
11781let value1 = Foot.create 1.0 // float<ft>
11882let value2 = Foot.create 2.0 // float<ft>
11983let maxValue = max value1 value2 // float<ft>
84+ let plainValue = Foot.create 1. |> removeUnits // float
12085```
12186
12287### C#
@@ -126,167 +91,4 @@ let maxValue = max value1 value2 // float<ft>
12691using Fs .Units .CSharp ;
12792
12893var valueInFeet = 1 d .InchToFeet (); // double
129- ```
130-
131- ## Supported Unit Categories
132-
133- ### Simple
134-
135- #### Length
136- - Inch
137- - Foot
138- - Yard
139- - Mile
140- - Millimeter
141- - Centimeter
142- - Decimeter
143- - Meter
144- - Kilometer
145- - NauticalMile
146- - Chain
147- - Furlong
148- - League
149- - Hand
150- - Rod
151- #### Time
152- - Nanosecond
153- - Microsecond
154- - Millisecond
155- - Second
156- - Minute
157- - Hour
158- - Day
159- - Week
160- - Fortnight
161- - Month
162- - Year
163- - Decade
164- - Century
165- - Millenium
166- - Eon
167- #### Mass
168- - Milligram
169- - Gram
170- - Kilogram
171- - Pound mass
172- #### Temperature
173- - Kelvin
174- - Celsius
175- - Fahrenheit
176- - Rankine
177- #### Angle
178- - Degree
179- - Radian
180- - Gradian
181- - Revolution
182- - Arcminute
183- - Arcsecond
184- #### DataStorage
185- - Bit
186- - Kilobit
187- - Megabit
188- - Gigabit
189- - Terabit
190- - Petabit
191- - Byte
192- - Kilobyte
193- - Megabyte
194- - Gigabyte
195- - Terabyte
196- - Petabyte
197- #### Frequency
198- - Hertz
199- - Kilohertz
200- - Megahertz
201- - Gigahertz
202- #### Illuminance
203- - Footcandle
204- - Lux
205- - Phot
206- - Nox
207- #### Current
208- - Microampere
209- - Milliampere
210- - Ampere
211- - Biot
212-
213- ### Compound
214-
215- #### Area
216- - SquareInch
217- - SquareFoot
218- - SquareCentimeter
219- - SquareMeter
220- #### Volume
221- - CubicInch
222- - CubicFoot
223- - CubicCentimeter
224- - CubicMeter
225- - Liter
226- - Gallon
227- #### FuelEconomy
228- - MilesPerGallon
229- - KilometersPerLiter
230- #### Inertia
231- - QuarticInch
232- - QuarticCentimeter
233- #### Speed
234- - FeetPerSecond
235- - MetersPerSecond
236- - MilesPerHour
237- - KilometersPerHour
238- #### Force
239- - Newton
240- - PoundForce
241- - Dyne
242- - Kip
243- #### DataTransferRate
244- - Baud
245- - BitsPerSecond
246- - KilobitsPerSecond
247- - MegabitsPerSecond
248- - GigabitsPerSecond
249- - TerabitsPerSecond
250- - PetabitsPerSecond
251- - BytesPerSecond
252- - KilobytesPerSecond
253- - MegabytesPerSecond
254- - GigabytesPerSecond
255- - TerabytesPerSecond
256- - PetabytesPerSecond
257- #### Density
258- - KilogramsPerCubicMeter
259- - GramsPerCubicCentimeter
260- - PoundMassPerCubicFoot
261- - PoundMassPerCubicInch
262- #### Pressure
263- - Pascal
264- - PoundsPerSquareInch
265- #### Power
266- - Watt
267- - KiloWatt
268- - ImperialHorsepower
269- - TonOfRefrigeration
270- #### Energy
271- - Joules
272- - KiloJoules
273- - BritishThermalUnits
274- - calories
275- - Quads
276- - Q
277- #### ElectricCharge
278- - Coulomb
279- - AmpereHour
280- - AmpereSecond
281- #### ElectromotiveForce
282- - Microvolts
283- - Millivolts
284- - Volts
285- - Kilovolts
286- - Megavolts
287- #### Capacitance
288- - Farads
289- #### Inductance
290- - MicroHenrys
291- - MilliHenrys
292- - Henrys
94+ ```
0 commit comments