Generic coordinates
The package supports generic coordinates.
Currently, support is provided for float2, double2, Vector2, fp2 and int2.
By default, the Triangulator class is based on the double2 type. To manually select the desired coordinate type, use the generic version, namely, Triangulator<T2>.
using var positions = new NativeArray<float2>(..., Allocator.Persistent);
using var triangulator = new Triangulator<float2>(Allocator.Persistent)
{
  Input = { Positions = positions },
};
triangulator.Run();
Triangulator<T2> has the same API (through Extensions), as Triangulator.
The only difference is that the input/output types are the same as T2.
See benchmark for the generic coordinates here.
| feature | float2 | 
Vector21 | 
double2 | 
fp22 | 
int23 | 
|---|---|---|---|---|---|
| delaunay | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | 
| constraints | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | 
| holes | ✔️ | ✔️ | ✔️ | ✔️ | 🟡4 | 
| refinement | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | 
| preprocessors | ✔️ | ✔️ | ✔️ | ✔️ | 🟡5 | 
| dynamic6 | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | 
| \(\alpha\)-shape | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | 
- 
This feature is available through an optional dependency. Users must install
com.danielmansson.mathematics.fixedpoint. See how to install it here.↩ - 
Support up to \(\sim 2^{20}\).↩
 - 
In the current implementation, holes are fully supported with
Settings.AutoHolesAndBoundary. However, manual holes withint2coordinates may not guarantee that the given hole can be created. An additional extension is planned in the future to support holes with manual floating-point precision forint2.↩ - 
Support for
Preprocessor.COMwith translation only is available.↩ - 
Available only through
UnsafeTriangulator<T>API.↩