Tune constants for nativeccd to perform better with single precision.

PiperOrigin-RevId: 928549147
Change-Id: Ic28c60f73e92bb1b9578c56f790b6cda94875907
This commit is contained in:
Kyle Bayes
2026-06-08 07:20:36 -07:00
committed by Copybara-Service
parent a0f014593b
commit ac7f198536
3 changed files with 68 additions and 53 deletions
+12 -10
View File
@@ -28,19 +28,21 @@
extern "C" {
#endif
// numerical max limit
#ifndef mjUSESINGLE
#define mjMAX_LIMIT DBL_MAX
#else
// numerical limits
#ifdef mjUSESINGLE
#define mjMAX_LIMIT FLT_MAX
// tolerance for normal alignment of two faces (cosine of 1.6e-3)
#define mjFACE_TOL 0.99999872f
// tolerance for edge-face alignment (sine of 1.6e-3)
#define mjEDGE_TOL 0.00159999931f
#else
#define mjMAX_LIMIT DBL_MAX
// tolerance for normal alignment of two faces (cosine of 1.6e-3)
#define mjFACE_TOL 0.99999872
// tolerance for edge-face alignment (sine of 1.6e-3)
#define mjEDGE_TOL 0.00159999931
#endif
// tolerance for normal alignment of two faces (cosine of 1.6e-3)
#define mjFACE_TOL 0.99999872
// tolerance for edge-face alignment (sine of 1.6e-3)
#define mjEDGE_TOL 0.00159999931
// max number of supported vertices in a polygon face of a mesh
#define mjMAX_POLYVERT 150