DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-rc.1" />

 Decrement

struct Decrement : ISupplier<double, double>, ISupplier<float, float>, ISupplier<IntPtr, IntPtr>
using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace DotNext.Threading { [StructLayout(LayoutKind.Auto)] internal readonly struct Decrement : ISupplier<double, double>, ISupplier<float, float>, ISupplier<IntPtr, IntPtr> { double ISupplier<double, double>.Invoke(double value) { return value - 1; } float ISupplier<float, float>.Invoke(float value) { return value - 1; } [return: System.Runtime.CompilerServices.NativeInteger] unsafe IntPtr ISupplier<IntPtr, IntPtr>.Invoke([System.Runtime.CompilerServices.NativeInteger] IntPtr value) { return (IntPtr)(void*)((long)value - 1); } } }