JCash / voronoi

A C implementation for creating 2D voronoi diagrams
MIT License
621 stars 92 forks source link

An all-in-one `#define` directive for the `double` precision. #72

Closed issuefiler closed 1 year ago

issuefiler commented 1 year ago

Suggestion

It’d be convenient if jc_voronoi.h could provide a single #define flag that sets all the following directives by default:

#define JC_VORONOI_IMPLEMENTATION
#define JCV_REAL_TYPE double
#define JCV_ATAN2 atan2
#define JCV_SQRT sqrt
#define JCV_FLT_MAX DBL_MAX
#define JCV_PI 3.141592653589793115997963468544185161590576171875

because I believe that, most of the time, those settings are not configured separately.

JCash commented 1 year ago

Hi @issuefiler

The point is to have configurability since some users do use their own functions of the game engine etc.

Also you can easily do this yourself in a wrapper header that you use. As such, I don't think there's enough merit to bring this change the code.