1 Commits

Author SHA1 Message Date
Jedd Morgan d8ba0b66e4 Update main.yml (#6) 2025-10-15 15:00:51 +01:00
11 changed files with 97 additions and 87 deletions
+2 -3
View File
@@ -3,11 +3,10 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.30.6",
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
],
"rollForward": false
]
}
}
}
+14 -5
View File
@@ -2,15 +2,18 @@ name: .NET Build and Publish
on:
push:
branches: ["master"]
tags:
tags: ["*.*.*"]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'nuget.org'
permissions:
id-token: write # enable GitHub OIDC token issuance for this job
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
filter: tree:0
@@ -29,6 +32,12 @@ jobs:
- name: 🔫 Build and Pack
run: ./build.sh pack
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push to nuget.org
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.CONNECTORS_NUGET_TOKEN }} --skip-duplicate
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{steps.login.outputs.NUGET_API_KEY}}
+5 -5
View File
@@ -1,14 +1,14 @@
<Project>
<ItemGroup>
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
<GlobalPackageReference Include="MinVer" Version="6.0.0" />
<GlobalPackageReference Include="PolySharp" Version="1.14.1" />
<GlobalPackageReference Include="MinVer" Version="5.0.0" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="xunit" Version="2.8.1" />
<PackageVersion Include="Bullseye" Version="5.0.0" />
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
</ItemGroup>
</Project>
</Project>
-2
View File
@@ -7,5 +7,3 @@ Forked from https://github.com/Weingartner/System.Numerics.DoubleVectors and upd
Needed because of:
- https://github.com/specklesystems/speckle-sharp/issues/2800
- https://github.com/dotnet/runtime/issues/24168
[CSharpier](https://csharpier.com/) used for formatting.
@@ -615,7 +615,7 @@ public class Matrix4x4Tests
public void Matrix4x4CreateShadowTest02()
{
// Complex cases.
Plane[] planes = { new(0, 1, 0, 0), new(1, 2, 3, 4), new(5, 6, 7, 8), new(-1, -2, -3, -4), new(-5, -6, -7, -8) };
Plane[] planes = { new(0, 1, 0, 0), new(1, 2, 3, 4), new(5, 6, 7, 8), new(-1, -2, -3, -4), new(-5, -6, -7, -8), };
Vector3[] points =
{
@@ -715,9 +715,9 @@ public class Matrix4x4Tests
CreateReflectionTest(new Plane(Vector3.UnitX, 0), Matrix4x4.CreateScale(-1, 1, 1));
// Complex cases.
Plane[] planes = { new(0, 1, 0, 0), new(1, 2, 3, 4), new(5, 6, 7, 8), new(-1, -2, -3, -4), new(-5, -6, -7, -8) };
Plane[] planes = { new(0, 1, 0, 0), new(1, 2, 3, 4), new(5, 6, 7, 8), new(-1, -2, -3, -4), new(-5, -6, -7, -8), };
Vector3[] points = { new(1, 2, 3), new(5, 6, 7), new(-1, -2, -3), new(-5, -6, -7) };
Vector3[] points = { new(1, 2, 3), new(5, 6, 7), new(-1, -2, -3), new(-5, -6, -7), };
foreach (Plane p in planes)
{
@@ -221,6 +221,6 @@ public class Perf_Vector2
SquareRoot = 8,
Length_Squared = 9,
Normalize = 10,
Distance_Squared = 11,
Distance_Squared = 11
}
}
+5 -3
View File
@@ -133,9 +133,11 @@ public static class Util
where T : struct => (T)(~(dynamic)left);
public static double Clamp(double value, double min, double max) =>
value > max ? max
: value < min ? min
: value;
value > max
? max
: value < min
? min
: value;
public static T Zero<T>()
where T : struct => (T)(dynamic)0;
+37 -37
View File
@@ -4,12 +4,12 @@
"net8.0": {
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.12.0, )",
"resolved": "17.12.0",
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
"requested": "[17.10.0, )",
"resolved": "17.10.0",
"contentHash": "0/2HeACkaHEYU3wc83YlcD2Fi4LMtECJjqrtvw0lPi9DCEa35zSPt1j4fuvM8NagjDqJuh1Ja35WcRtn1Um6/A==",
"dependencies": {
"Microsoft.CodeCoverage": "17.12.0",
"Microsoft.TestPlatform.TestHost": "17.12.0"
"Microsoft.CodeCoverage": "17.10.0",
"Microsoft.TestPlatform.TestHost": "17.10.0"
}
},
"Microsoft.SourceLink.GitHub": {
@@ -24,25 +24,25 @@
},
"MinVer": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+/SsmiySsXJlvQLCGBqaZKNVt3s/Y/HbAdwtop7Km2CnuZbaScoqkWJEBQ5Cy9ebkn6kCYKrHsXgwrFdTgcb3g=="
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "ybkgpQMtt0Fo91l5rYtE3TZtD+Nmy5Ko091xvfXXOosQdMi30XO2EZ2+ShZt89gdu7RMmJqZaJ+e1q6d+6+KNw=="
},
"PolySharp": {
"type": "Direct",
"requested": "[1.15.0, )",
"resolved": "1.15.0",
"contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g=="
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"xunit": {
"type": "Direct",
"requested": "[2.9.3, )",
"resolved": "2.9.3",
"contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
"requested": "[2.8.1, )",
"resolved": "2.8.1",
"contentHash": "MLBz2NQp3rtSIoJdjj3DBEr/EeOFlQYF3oCCljat3DY9GQ7yYmtjIAv8Zyfm5BcwYso5sjvIe5scuHaJPVCGIQ==",
"dependencies": {
"xunit.analyzers": "1.18.0",
"xunit.assert": "2.9.3",
"xunit.core": "[2.9.3]"
"xunit.analyzers": "1.14.0",
"xunit.assert": "2.8.1",
"xunit.core": "[2.8.1]"
}
},
"Microsoft.Build.Tasks.Git": {
@@ -52,8 +52,8 @@
},
"Microsoft.CodeCoverage": {
"type": "Transitive",
"resolved": "17.12.0",
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
"resolved": "17.10.0",
"contentHash": "yC7oSlnR54XO5kOuHlVOKtxomNNN1BWXX8lK1G2jaPXT9sUok7kCOoA4Pgs0qyFaCtMrNsprztYMeoEGqCm4uA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
@@ -62,18 +62,18 @@
},
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.12.0",
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
"resolved": "17.10.0",
"contentHash": "KkwhjQevuDj0aBRoPLY6OLAhGqbPUEBuKLbaCs0kUVw29qiOYncdORd4mLVJbn9vGZ7/iFGQ/+AoJl0Tu5Umdg==",
"dependencies": {
"System.Reflection.Metadata": "1.6.0"
}
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
"resolved": "17.12.0",
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
"resolved": "17.10.0",
"contentHash": "LWpMdfqhHvcUkeMCvNYJO8QlPLlYz9XPPb+ZbaXIKhdmjAV0wqTSrTiW5FLaf7RRZT50AQADDOYMOe0HxDxNgA==",
"dependencies": {
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
"Microsoft.TestPlatform.ObjectModel": "17.10.0",
"Newtonsoft.Json": "13.0.1"
}
},
@@ -94,37 +94,37 @@
},
"xunit.analyzers": {
"type": "Transitive",
"resolved": "1.18.0",
"contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ=="
"resolved": "1.14.0",
"contentHash": "KcFBmV2150xZHPUebV3YLR5gGl8R4wLuPOoxMiwCf1L4bL8ls0dcwtGFzr6NvQRgg6dWgSqbE52I6SYyeB0VnQ=="
},
"xunit.assert": {
"type": "Transitive",
"resolved": "2.9.3",
"contentHash": "/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA=="
"resolved": "2.8.1",
"contentHash": "DDM18ur+PeNFhQ4w/vO+uvCUy8hA3OS5+AMf/CFov9Wco7Le49zzj0hovRWwa8f/3vaUfjL5r+IkPvqEHu2IIg=="
},
"xunit.core": {
"type": "Transitive",
"resolved": "2.9.3",
"contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
"resolved": "2.8.1",
"contentHash": "Ng4Q/DOwotESPl5CufcdqgP6O2KDpdEcIvNfA3upzfCiBrkj5WsmLhf/XUsCVolzvHA7b1WUlyeTo7j1ulG4gQ==",
"dependencies": {
"xunit.extensibility.core": "[2.9.3]",
"xunit.extensibility.execution": "[2.9.3]"
"xunit.extensibility.core": "[2.8.1]",
"xunit.extensibility.execution": "[2.8.1]"
}
},
"xunit.extensibility.core": {
"type": "Transitive",
"resolved": "2.9.3",
"contentHash": "kf3si0YTn2a8J8eZNb+zFpwfoyvIrQ7ivNk5ZYA5yuYk1bEtMe4DxJ2CF/qsRgmEnDr7MnW1mxylBaHTZ4qErA==",
"resolved": "2.8.1",
"contentHash": "ilfAsxEhpne9AXXf3W+O65mRgGum94m2xHYm1yeJ1m7eiINM6OOwpaHhoNC/KWEQ2u/WF6/XiEs+Q0TOq7hiGA==",
"dependencies": {
"xunit.abstractions": "2.0.3"
}
},
"xunit.extensibility.execution": {
"type": "Transitive",
"resolved": "2.9.3",
"contentHash": "yMb6vMESlSrE3Wfj7V6cjQ3S4TXdXpRqYeNEI3zsX31uTsGMJjEw6oD5F5u1cHnMptjhEECnmZSsPxB6ChZHDQ==",
"resolved": "2.8.1",
"contentHash": "38UnJW+64Wn8QIabujcNEw0HKvWw2AlYCgU8GNwCCDqyrSuRYb7zwetn7SHoHfbL9e9FAvEiAMXmc2wSUY8sVQ==",
"dependencies": {
"xunit.extensibility.core": "[2.9.3]"
"xunit.extensibility.core": "[2.8.1]"
}
},
"speckle.doublenumerics": {
+12 -10
View File
@@ -221,11 +221,12 @@ public struct Matrix4x4 : IEquatable<Matrix4x4>
{
const double epsilon = 1e-4;
Vector3 zaxis = new(
objectPosition.X - cameraPosition.X,
objectPosition.Y - cameraPosition.Y,
objectPosition.Z - cameraPosition.Z
);
Vector3 zaxis =
new(
objectPosition.X - cameraPosition.X,
objectPosition.Y - cameraPosition.Y,
objectPosition.Z - cameraPosition.Z
);
double norm = zaxis.LengthSquared();
@@ -286,11 +287,12 @@ public struct Matrix4x4 : IEquatable<Matrix4x4>
const double minAngle = 1.0 - (0.1 * (Math.PI / 180.0)); // 0.1 degrees
// Treat the case when object and camera positions are too close.
Vector3 faceDir = new(
objectPosition.X - cameraPosition.X,
objectPosition.Y - cameraPosition.Y,
objectPosition.Z - cameraPosition.Z
);
Vector3 faceDir =
new(
objectPosition.X - cameraPosition.X,
objectPosition.Y - cameraPosition.Y,
objectPosition.Z - cameraPosition.Z
);
double norm = faceDir.LengthSquared();
+12 -12
View File
@@ -14,9 +14,9 @@
},
"MinVer": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+/SsmiySsXJlvQLCGBqaZKNVt3s/Y/HbAdwtop7Km2CnuZbaScoqkWJEBQ5Cy9ebkn6kCYKrHsXgwrFdTgcb3g=="
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "ybkgpQMtt0Fo91l5rYtE3TZtD+Nmy5Ko091xvfXXOosQdMi30XO2EZ2+ShZt89gdu7RMmJqZaJ+e1q6d+6+KNw=="
},
"NETStandard.Library": {
"type": "Direct",
@@ -29,9 +29,9 @@
},
"PolySharp": {
"type": "Direct",
"requested": "[1.15.0, )",
"resolved": "1.15.0",
"contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g=="
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
@@ -62,15 +62,15 @@
},
"MinVer": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+/SsmiySsXJlvQLCGBqaZKNVt3s/Y/HbAdwtop7Km2CnuZbaScoqkWJEBQ5Cy9ebkn6kCYKrHsXgwrFdTgcb3g=="
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "ybkgpQMtt0Fo91l5rYtE3TZtD+Nmy5Ko091xvfXXOosQdMi30XO2EZ2+ShZt89gdu7RMmJqZaJ+e1q6d+6+KNw=="
},
"PolySharp": {
"type": "Direct",
"requested": "[1.15.0, )",
"resolved": "1.15.0",
"contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g=="
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
+6 -6
View File
@@ -26,15 +26,15 @@
},
"MinVer": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+/SsmiySsXJlvQLCGBqaZKNVt3s/Y/HbAdwtop7Km2CnuZbaScoqkWJEBQ5Cy9ebkn6kCYKrHsXgwrFdTgcb3g=="
"requested": "[5.0.0, )",
"resolved": "5.0.0",
"contentHash": "ybkgpQMtt0Fo91l5rYtE3TZtD+Nmy5Ko091xvfXXOosQdMi30XO2EZ2+ShZt89gdu7RMmJqZaJ+e1q6d+6+KNw=="
},
"PolySharp": {
"type": "Direct",
"requested": "[1.15.0, )",
"resolved": "1.15.0",
"contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g=="
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"SimpleExec": {
"type": "Direct",