Skip to content

Commit 3d19b51

Browse files
committed
Use new UpdateBounds on NetCore 6.0+
1 parent 2dfee77 commit 3d19b51

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/SharpGLTF.Core/Schema2/VectorMinMax.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if NET6_0_OR_GREATER
12
using System;
23
using System.Numerics;
34
using System.Runtime.Intrinsics;
@@ -307,4 +308,5 @@ private static unsafe void ProcessRemainingElements(float* ptr, int start, int l
307308
}
308309
}
309310
}
310-
}
311+
}
312+
#endif

src/SharpGLTF.Core/Schema2/gltf.Accessors.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ protected override IEnumerable<ExtraProperties> GetLogicalChildren()
149149
return base.GetLogicalChildren().ConcatElements(_sparse);
150150
}
151151

152+
#if NET6_0_OR_GREATER
152153
public void UpdateBounds()
153154
{
154155
this._min.Clear();
@@ -173,8 +174,8 @@ public void UpdateBounds()
173174
_max.Add(max[i]);
174175
}
175176
}
176-
177-
public void UpdateBoundsOld()
177+
#else
178+
public void UpdateBounds()
178179
{
179180
this._min.Clear();
180181
this._max.Clear();
@@ -209,6 +210,7 @@ public void UpdateBoundsOld()
209210
}
210211
}
211212
}
213+
#endif
212214

213215
#endregion
214216

src/SharpGLTF.Core/SharpGLTF.Core.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,4 @@
2828
</None>
2929
</ItemGroup>
3030

31-
<ItemGroup>
32-
<PackageReference Include="System.Numerics.Tensors" Version="8.0.0" />
33-
</ItemGroup>
34-
3531
</Project>

0 commit comments

Comments
 (0)