Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6c1fcb7
Created Units project, implemented Temperature unit, and added unit t…
MrMatthewLayton Aug 31, 2025
ba4ed9a
Added DataSize implementation and unit tests.
MrMatthewLayton Sep 1, 2025
54d322f
Added Romer scale to Temperature.
MrMatthewLayton Sep 2, 2025
c88583e
Added Distance<T> implementation, and unit tests.
MrMatthewLayton Sep 6, 2025
9443551
Merge branch 'main' into feature/units
MrMatthewLayton Oct 22, 2025
c496172
Merge branch 'main' into feature/units
MrMatthewLayton Nov 16, 2025
344e974
Converted extension method to extension block.
MrMatthewLayton Nov 16, 2025
3ba1704
Removed verbosity flag from GitHub Action workflow.
MrMatthewLayton Nov 16, 2025
399d780
Added verbosity back in, but made it detailed to try and sniff out th…
MrMatthewLayton Nov 16, 2025
2824851
GitHub Action updated to include detailed logging in the console.
MrMatthewLayton Nov 16, 2025
9f7d5d5
GitHub Action updated to include detailed output.
MrMatthewLayton Nov 16, 2025
96a24d0
GitHub Actions workflow updated again in an attempt to reduce log siz…
MrMatthewLayton Nov 16, 2025
7ac6774
Attempt to fix failing test.
MrMatthewLayton Nov 16, 2025
b838b86
Added Mass unit to Units library, and updated xmldocs for consistency.
MrMatthewLayton Nov 17, 2025
7f2c656
Added Mass tests
MrMatthewLayton Nov 18, 2025
0d789c0
Added Force unit and unit tests.
MrMatthewLayton Nov 18, 2025
c1cd5b9
Added Area unit and unit tests.
MrMatthewLayton Nov 19, 2025
3a3a791
Removed playground test code.
MrMatthewLayton Nov 19, 2025
84decc3
Added Volume unit and unit tests.
MrMatthewLayton Nov 19, 2025
3fa0ba3
Added Speed unit and tests.
MrMatthewLayton Nov 19, 2025
b094d17
Added Pressure unit and unit tests.
MrMatthewLayton Nov 19, 2025
6fc8191
Simplified the exception messaging in Unit string formatting.
MrMatthewLayton Nov 20, 2025
ffa62ae
Added Frequency unit and unit tests
MrMatthewLayton Nov 20, 2025
9eee026
Added Energy unit and unit tests.
MrMatthewLayton Nov 20, 2025
7fb90b5
Added Power unit and unit tests.
MrMatthewLayton Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
- name: Build
run: dotnet build --no-restore
- name: Test (.NET 8.0)
run: dotnet test --no-build --framework net8.0 --verbosity quiet
run: dotnet test --no-build --output Normal --no-progress --framework net8.0
- name: Test (.NET 9.0)
run: dotnet test --no-build --framework net9.0 --verbosity quiet
run: dotnet test --no-build --output Normal --no-progress --framework net9.0
- name: Test (.NET 10.0)
run: dotnet test --no-build --framework net10.0 --verbosity quiet
run: dotnet test --no-build --output Normal --no-progress --framework net10.0
6 changes: 3 additions & 3 deletions OnixLabs.Numerics/GenericMath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static class GenericMath
/// <returns>Returns the factorial of the specified <see cref="IBinaryInteger{TSelf}"/> value.</returns>
public static BigInteger Factorial<T>(T value) where T : IBinaryInteger<T>
{
Require(value >= T.Zero, "Value must be greater than or equal to zero.");
Require(value >= T.Zero, "Value must be greater than or equal to zero.", nameof(value));

if (value <= T.One) return BigInteger.One;

Expand Down Expand Up @@ -84,15 +84,15 @@ public static T Pow10<T>(int exponent) where T : INumber<T>
{
Require(exponent >= 0, "Exponent must be greater than, or equal to zero.", nameof(exponent));

if (exponent == 0)
if (exponent is 0)
return T.One;

T result = T.One;
T baseValue = T.CreateChecked(10);

while (exponent > 0)
{
if ((exponent & 1) == 1)
if ((exponent & 1) is 1)
result *= baseValue;

baseValue *= baseValue;
Expand Down
1 change: 1 addition & 0 deletions OnixLabs.Playground/OnixLabs.Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ProjectReference Include="..\OnixLabs.Numerics\OnixLabs.Numerics.csproj"/>
<ProjectReference Include="..\OnixLabs.Security.Cryptography\OnixLabs.Security.Cryptography.csproj"/>
<ProjectReference Include="..\OnixLabs.Security\OnixLabs.Security.csproj"/>
<ProjectReference Include="..\OnixLabs.Units\OnixLabs.Units.csproj" />
<Using Include="OnixLabs.Core.Preconditions" Static="True"/>
</ItemGroup>
</Project>
Loading