DoubleSharp 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package DoubleSharp --version 0.0.1                
NuGet\Install-Package DoubleSharp -Version 0.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DoubleSharp" Version="0.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DoubleSharp --version 0.0.1                
#r "nuget: DoubleSharp, 0.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DoubleSharp as a Cake Addin
#addin nuget:?package=DoubleSharp&version=0.0.1

// Install DoubleSharp as a Cake Tool
#tool nuget:?package=DoubleSharp&version=0.0.1                

NuGet Badge for DoubleSharp GitHub Workflow Status

Overview

DoubleSharp provides convenience features for:

  • LINQ: ToDictionary converting IEnumerables of tuples into Dictionarys automatically; Shuffle and Shuffled providing in-place and copy shuffles; Flatten reducing the nesting of IEnumerables; and much more
  • Concurrency: Locked extension method on objects allowing locking as an expression; Increment/Decrement/Add/And/Or providing inline atomic operations
  • Functional: Compose allowing function composition
  • Progress: WithProgress and WithTimedProgress extension methods on IEnumerable/ICollection providing parallel-friendly progress bars
  • Random: Rng providing a static class with automatic per-CPU seeds
  • Pretty: ToPrettyString extension method for all objects to convert it to a human-readable form; Print and PrettyPrint extension methods (aliases) to print that to the console, akin to Python's pprint module
  • Buffers: Cast and AsEnumerable extensions for Memory<T> and Span<T>, HexDump (for Console/TextWriter output) and ToHexDump (for string creation) for all common unmanaged buffers
  • MathPlus: Swizzles for Vector2/3/4, tuple<->Vector conversions, Vector deconstruction, Centroid extension method for IEnumerable<Vector2/3/4>, Map for Vector to perform elementwise transformation, bit operations for unsigned integer types, Ceil/Floor/Round extensions for float/double, and CeilInt/FloorInt/RoundInt extensions for floor/double to int
  • IO: Vector extensions for BinaryReader/BinaryWriter.

Our general goal is to make C# even easier to use than it is right now. If it's something we have to write in several projects, it should be here instead.

API Documentation

API docs are available at https://doublesharp.dev/

Usage

Simply reference the DoubleSharp package on NuGet and then import the namespaces with the functionality you need.

Check out the progress bar example or the unit tests for use cases!

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.3 137 4/6/2024
0.0.2 115 4/6/2024
0.0.1 306 12/21/2022
0.0.1-beta1 133 12/20/2022
0.0.1-alpha8 133 12/19/2022
0.0.1-alpha7 131 12/19/2022
0.0.1-alpha6 125 12/19/2022
0.0.1-alpha5 129 12/19/2022
0.0.1-alpha4 120 12/19/2022
0.0.1-alpha3 136 12/19/2022
0.0.1-alpha2 139 12/18/2022
0.0.1-alpha 131 12/18/2022