Getting Started¶
Install¶
Namespaces¶
Most core primitives live in Akeldov.Math.Spatial2D.
Feature areas use sub-namespaces:
using Akeldov.Math.Spatial2D.Curves;
using Akeldov.Math.Spatial2D.Fields;
using Akeldov.Math.Spatial2D.Partitioning.Voronoi;
using Akeldov.Math.Spatial2D.Sampling.Point.PoissonDisk;
Coordinates¶
The library uses float for VectorXY and int for VectorXYInt.
var position = new VectorXY(3.5f, 8f);
var cell = new VectorXYInt(3, 8);
VectorXY asFloat = cell;
VectorXYInt truncated = (VectorXYInt)position;
VectorXYInt rounded = position.RoundToInt();
Floating-Point Comparisons¶
Geometry operations often need tolerance-based comparison. Use AlmostEquals and GeometryConstants.GeometryEpsilon when exact component equality is too strict.