- Notifications
You must be signed in to change notification settings - Fork 416
Add quantity CloudCover#883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
667b30e1ee061820f3be9c960e629ecac36File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "Name": "CloudCover", | ||
| "BaseUnit": "Fraction", | ||
| "XmlDoc": "Cloud cover (also known as cloudiness, cloudage, or cloud amount) refers to the fraction of the sky obscured by clouds when observed from a particular location.", | ||
| "Units": [ | ||
| { | ||
| "SingularName": "Okta", | ||
| "PluralName": "Oktas", | ||
| "FromUnitToBaseFunc": "x * 0.125", | ||
| "FromBaseToUnitFunc": "UnitsNetMath.Clamp(System.Math.Round(x / 0.125, MidpointRounding.AwayFromZero),0,8)", | ||
| "Localization": [ | ||
| { | ||
| "Culture": "en-US", | ||
| "Abbreviations": [ "oktas" ] | ||
MarkCiliaVincenti marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "SingularName": "Percent", | ||
| "PluralName": "Percent", | ||
| "FromUnitToBaseFunc": "UnitsNetMath.Clamp(x/1e2,0,1)", | ||
| "FromBaseToUnitFunc": "UnitsNetMath.Clamp(x*1e2,0,1e2)", | ||
| "Localization": [ | ||
| { | ||
| "Culture": "en-US", | ||
| "Abbreviations": [ "%" ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "SingularName": "Fraction", | ||
| "PluralName": "Fractions", | ||
| "FromUnitToBaseFunc": "UnitsNetMath.Clamp(x,0,1)", | ||
| "FromBaseToUnitFunc": "UnitsNetMath.Clamp(x,0,1)", | ||
| "Localization": [ | ||
| { | ||
| "Culture": "en-US", | ||
| "Abbreviations": [ "" ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| //------------------------------------------------------------------------------ | ||
| // <auto-generated> | ||
| // This code was generated by \generate-code.bat. | ||
| // | ||
| // Changes to this file will be lost when the code is regenerated. | ||
| // The build server regenerates the code before each build and a pre-build | ||
| // step will regenerate the code on each local build. | ||
| // | ||
| // See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units. | ||
| // | ||
| // Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities. | ||
| // Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities. | ||
| // | ||
| // </auto-generated> | ||
| //------------------------------------------------------------------------------ | ||
| // Licensed under MIT No Attribution, see LICENSE file at the root. | ||
| // Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet. | ||
| using System; | ||
| namespace UnitsNet.Tests.CustomCode | ||
| { | ||
| public class CloudCoverTests : CloudCoverTestsBase | ||
| { | ||
| protected override double FractionsInOneFraction => 1; | ||
| protected override double OktasInOneFraction => 8; | ||
| protected override double PercentInOneFraction => 1e2; | ||
| protected override bool SupportsSIUnitSystem => false; | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.