Skip to content

olivegamestudio/Progenitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Progenitor

A lightweight .NET library providing common maths utilities, easing functions, and domain primitives for games and simulations.

NuGet NuGet Downloads License: MIT

Features

Maths & Geometry

  • 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)

Domain Primitives

  • Money — currency-aware monetary type with arithmetic and safety checks
  • Credit — simple credit/balance type with arithmetic

Installation

dotnet add package Progenitor

Usage

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");

Requirements

  • .NET Standard 2.0+

License

MIT

About

A lightweight .NET library providing common maths utilities, easing functions, and domain primitives for games and simulations.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages