ThomasMiz / RectpackSharp

A rectangle packing library for .NET Standard
MIT License
85 stars 12 forks source link

Multi-target #5

Closed bartimaeusnek closed 10 months ago

bartimaeusnek commented 11 months ago

Allows for newer .NET versions to use Span<PackingRectangle> instead of PackingRectangle[].

Therefore allowing:

.NET5 has been choosen as target since its the oldest framework that has Span.Sort, and therefore providing maximum compability.

ThomasMiz commented 10 months ago

Thanks for your contribution!

Sorry about the delay, this kinda got lost between the emails 💀

All looks good, the only thing I'm unsure about is how multitarget works on NuGet, as I've never published a multitarget package personally, but looking at this page it seems I don't have to change anything on the way I publish the package

BenMcLean commented 4 months ago

This breaks compatibility with existing code that uses the array version of Pack. For higher versions of .NET, both array and Span should be available.