AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

Use fabsf() for single-precision absolute value #1629

Closed c0d1f1ed closed 1 year ago

c0d1f1ed commented 1 year ago

Overloads of fabs() for both double and float are only available from C++'s header, not the C header.

Every other math function already correctly used the non-overloaded function name; this was the only outlier. While NanoVDB is written in C++, this change helps avoid requiring C++ headers to be included, which significantly affect compilation time, especially for projects performing just-in-time compilation at runtime.

linux-foundation-easycla[bot] commented 1 year ago

CLA Signed

The committers listed above are authorized under a signed CLA.

kmuseth commented 1 year ago

Closing this PR since I'll adopt it elsewhere (see review comment for an explanation)