A lightweight .NET library providing common maths utilities, easing functions, and domain primitives for games and simulations.
- Vector — 2D vector with normalisation
- Angle — angle calculation between points
- Distance — Euclidean distance between points
- Degrees / Radians — type-safe angle representations with conversion extensions
- Interpolation — lerp and easing-based interpolation
- Easing Functions — quad, cubic, quart, and quint (in, out, in-out)
- Money — currency-aware monetary type with arithmetic and safety checks
- Credit — simple credit/balance type with arithmetic
dotnet add package Progenitor
using Progenitor;
// Interpolation
float value = Interpolate.Lerp(0f, 100f, 0.5f); // 50
// Easing
float eased = Interpolate.Easing(0f, 100f, 0.5f, EasingFunctions.EaseInOutCubic);
// Vectors
var direction = Maths.Normalize(new Vector(3, 4));
float dist = Distance.BetweenPoints(new Vector(0, 0), new Vector(3, 4)); // 5
// Money
var price = new Money(9.99m, "GBP");
var total = price + new Money(5.00m, "GBP");- .NET Standard 2.0+
MIT