Skip to content

Commit b70d0c6

Browse files
Add Luminance units (#1111)
1 parent ee92862 commit b70d0c6

File tree

23 files changed

+3644
-0
lines changed

23 files changed

+3644
-0
lines changed

Common/UnitDefinitions/Luminance.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"Name": "Luminance",
3+
"BaseUnit": "CandelaPerSquareMeter",
4+
"BaseType": "double",
5+
"XmlDoc": "Luminance is a photometric measure of the luminous intensity per unit area of light travelling in a given direction.",
6+
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Luminance",
7+
"BaseDimensions": {
8+
"J": 1,
9+
"L": -2
10+
},
11+
"Units": [
12+
{
13+
"SingularName": "CandelaPerSquareMeter",
14+
"PluralName": "CandelasPerSquareMeter",
15+
"FromUnitToBaseFunc": "{x}",
16+
"FromBaseToUnitFunc": "{x}",
17+
"BaseUnits": {
18+
"J": "Candela",
19+
"L": "Meter"
20+
},
21+
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo" ],
22+
"Localization": [
23+
{
24+
"Culture": "en-US",
25+
"Abbreviations": [ "Cd/m²" ]
26+
}
27+
]
28+
},
29+
{
30+
"SingularName": "CandelaPerSquareFoot",
31+
"PluralName": "CandelasPerSquareFoot",
32+
"FromUnitToBaseFunc": "{x}* 1.07639e1",
33+
"FromBaseToUnitFunc": "{x}/ 1.07639e1",
34+
"Localization": [
35+
{
36+
"Culture": "en-US",
37+
"Abbreviations": [ "Cd/ft²" ]
38+
}
39+
]
40+
},
41+
{
42+
"SingularName": "CandelaPerSquareInch",
43+
"PluralName": "CandelasPerSquareInch",
44+
"FromUnitToBaseFunc": "{x}* 1.5500031e3",
45+
"FromBaseToUnitFunc": "{x}/ 1.5500031e3",
46+
"Localization": [
47+
{
48+
"Culture": "en-US",
49+
"Abbreviations": [ "Cd/in²" ]
50+
}
51+
]
52+
},
53+
{
54+
"SingularName": "Nit",
55+
"PluralName": "Nits",
56+
"FromUnitToBaseFunc": "{x}",
57+
"FromBaseToUnitFunc": "{x}",
58+
"XmlDocRemarks": "https://www.britannica.com/science/luminosity",
59+
"Localization": [
60+
{
61+
"Culture": "en-US",
62+
"Abbreviations": [ "nt" ]
63+
}
64+
]
65+
}
66+
]
67+
}

Common/UnitEnumValues.g.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,5 +1637,17 @@
16371637
"InchToTheSixth": 4,
16381638
"MeterToTheSixth": 5,
16391639
"MillimeterToTheSixth": 6
1640+
},
1641+
"Luminance": {
1642+
"CandelaPerSquareFoot": 10,
1643+
"CandelaPerSquareInch": 7,
1644+
"CandelaPerSquareMeter": 8,
1645+
"CenticandelaPerSquareMeter": 3,
1646+
"DecicandelaPerSquareMeter": 4,
1647+
"KilocandelaPerSquareMeter": 9,
1648+
"MicrocandelaPerSquareMeter": 6,
1649+
"MillicandelaPerSquareMeter": 2,
1650+
"NanocandelaPerSquareMeter": 1,
1651+
"Nit": 5
16401652
}
16411653
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<NanoFrameworkProjectSystemPath>$(MSBuildToolsPath)..\..\..\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
5+
</PropertyGroup>
6+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
7+
<PropertyGroup>
8+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
11+
<ProjectGuid>{cbded274-6b9b-a113-d56f-00b38006cc84}</ProjectGuid>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<FileAlignment>512</FileAlignment>
15+
<RootNamespace>UnitsNet</RootNamespace>
16+
<AssemblyName>UnitsNet.Luminance</AssemblyName>
17+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).xml</DocumentationFile>
19+
</PropertyGroup>
20+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
21+
<ItemGroup>
22+
<Compile Include="..\Quantities\Luminance.g.cs" />
23+
<Compile Include="..\Units\LuminanceUnit.g.cs" />
24+
<Compile Include="..\Properties\AssemblyInfo.cs" />
25+
</ItemGroup>
26+
<ItemGroup>
27+
<Reference Include="mscorlib, Version=1.12.0.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
28+
<HintPath>..\packages\nanoFramework.CoreLibrary.1.12.0\lib\mscorlib.dll</HintPath>
29+
<Private>True</Private>
30+
<SpecificVersion>True</SpecificVersion>
31+
</Reference>
32+
</ItemGroup>
33+
<ItemGroup>
34+
<None Include="packages.config" />
35+
</ItemGroup>
36+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
37+
<ProjectExtensions>
38+
<ProjectCapabilities>
39+
<ProjectConfigurationsDeclaredAsItems />
40+
</ProjectCapabilities>
41+
</ProjectExtensions>
42+
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>UnitsNet.nanoFramework.Luminance</id>
5+
<version>4.137.0</version>
6+
<title>Units.NET Luminance - nanoFramework</title>
7+
<authors>Andreas Gullberg Larsen,nanoFramework project contributors</authors>
8+
<owners>UnitsNet</owners>
9+
<license type="expression">MIT</license>
10+
<projectUrl>https://github.com/angularsen/UnitsNet</projectUrl>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Adds Luminance units for Units.NET on .NET nanoFramework. For .NET or .NET Core, use UnitsNet instead.</description>
13+
<iconUrl>https://raw.githubusercontent.com/angularsen/UnitsNet/ce85185429be345d77eb2ce09c99d59cc9ab8aed/Docs/Images/logo-32.png</iconUrl>
14+
<releaseNotes>
15+
</releaseNotes>
16+
<copyright>Copyright 2013 Andreas Gullberg Larsen ([email protected]).</copyright>
17+
<language>en-US</language>
18+
<tags>nanoframework unit units measurement si metric imperial abbreviation abbreviations convert conversion parse c# .net immutable uwp uap winrt win10 windows runtime component luminance</tags>
19+
<dependencies>
20+
<dependency id="nanoFramework.CoreLibrary" version="1.12.0" />
21+
</dependencies>
22+
</metadata>
23+
<files>
24+
<file src="..\..\..\Artifacts\UnitsNet.NanoFramework\Luminance\UnitsNet.*" target="lib" />
25+
</files>
26+
</package>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="nanoFramework.CoreLibrary" version="1.12.0" targetFramework="netnanoframework10" />
4+
</packages>

0 commit comments

Comments
 (0)