PowBasics.Geom
0.0.27
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PowBasics.Geom --version 0.0.27
NuGet\Install-Package PowBasics.Geom -Version 0.0.27
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="PowBasics.Geom" Version="0.0.27" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PowBasics.Geom --version 0.0.27
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PowBasics.Geom, 0.0.27"
#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 PowBasics.Geom as a Cake Addin #addin nuget:?package=PowBasics.Geom&version=0.0.27 // Install PowBasics.Geom as a Cake Tool #tool nuget:?package=PowBasics.Geom&version=0.0.27
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PowBasics Library Collection
Table of content
Introduction
This is a collection of utility functions I found I often need in my projects. They are split over 3 packages:
- PowBasics General utility functions (no dependencies)
- PowBasics.Geom Structs & utils for Rectangles, points, margins... (no dependencies)
- PowBasics.WinForms Utilities for WinForms depends on WinForms
- PowBasics.Rx Utilities for reactive extensions depends on System.Reactive
PowBasics
Math
public static class MathUtils
{
// Cap a number between 2 bounds (inclusive)
int Cap(int val, int min, int max);
/*
Compute the minimum number of multiples of b we need to be at least a
Note: this is not the same as integer division.
Integer division: 7 / 3 = 2 (but 2*3=6 doesn't cover/fill 7 completely)
FillingDiv(7, 3) = 3
*/
int FillingDiv(int a, int b);
}
PowBasics.Geom
It contains :
- records for points, size, rectangles (both with int & double coordinates)
- records for margins and padding
It has all the operations you'd expect either as member methods or extension methods. Including:
- + & - operators between rectangles (R) and margins & paddings (Marg && Pad)
- Mirror operations for margins & paddings. (Swaps x and y coordinates)
record Pt(int X, int Y);
record R(int X, int Y, int Width, int Height);
record Sz(int Width, int Height);
record VecPt(double X, double Y);
record VecR(VecPt Min, VecPt Max);
enum Dir { Horiz, Vert }
interface IMarg {
int Top { get; }
int Right { get; }
int Bottom { get; }
int Left { get; }
}
record Marg(int Top, int Right, int Bottom, int Left) : IMarg;
record Pad(int Top, int Right, int Bottom, int Left, int InBetween) : IMarg;
PowBasics.WinForms
PowBasics.Rx
License
MIT
Product | Versions 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 (3)
Showing the top 3 NuGet packages that depend on PowBasics.Geom:
Package | Downloads |
---|---|
PowTrees
Tree structure with algorithms |
|
PowWeb
Puppeteer and Chrome DOMSnapshot API wrapper |
|
PowBasics.WinForms
Collection of general utility functions |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.1 | 177 | 6/30/2024 |
0.2.0 | 106 | 6/30/2024 |
0.1.6 | 150 | 2/12/2024 |
0.1.5 | 128 | 1/31/2024 |
0.1.4 | 113 | 1/31/2024 |
0.1.3 | 114 | 1/31/2024 |
0.1.1 | 132 | 1/19/2024 |
0.1.0 | 114 | 1/19/2024 |
0.0.40 | 190 | 9/16/2023 |
0.0.39 | 148 | 9/16/2023 |
0.0.38 | 180 | 9/16/2023 |
0.0.37 | 171 | 9/16/2023 |
0.0.36 | 164 | 9/16/2023 |
0.0.35 | 193 | 9/15/2023 |
0.0.34 | 222 | 8/23/2023 |
0.0.33 | 189 | 8/22/2023 |
0.0.32 | 326 | 8/5/2023 |
0.0.31 | 167 | 7/30/2023 |
0.0.30 | 213 | 7/12/2023 |
0.0.29 | 191 | 7/12/2023 |
0.0.28 | 188 | 7/11/2023 |
0.0.27 | 200 | 7/10/2023 |
0.0.26 | 171 | 7/10/2023 |
0.0.25 | 168 | 7/10/2023 |
0.0.24 | 194 | 7/9/2023 |
0.0.23 | 209 | 7/5/2023 |
0.0.22 | 189 | 7/5/2023 |
0.0.21 | 181 | 7/5/2023 |
0.0.20 | 195 | 7/5/2023 |
0.0.19 | 172 | 7/5/2023 |
0.0.18 | 216 | 7/4/2023 |
0.0.17 | 222 | 7/2/2023 |
0.0.16 | 224 | 6/21/2023 |
0.0.15 | 236 | 6/15/2023 |
0.0.14 | 211 | 6/15/2023 |
0.0.13 | 221 | 6/15/2023 |
0.0.12 | 219 | 6/12/2023 |
0.0.11 | 250 | 6/5/2023 |
0.0.10 | 288 | 5/28/2023 |
0.0.9 | 269 | 5/28/2023 |
0.0.6 | 542 | 11/26/2022 |
0.0.5 | 353 | 11/26/2022 |
0.0.4 | 443 | 11/15/2022 |