From a19a25e19168fc73f2152b1e864122f6f5b4d9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A2=85=EC=9D=98=20=28PARK=2C=20Jongeui=29?= <17763502+bitsandscraps@users.noreply.github.com> Date: Mon, 20 May 2019 13:33:23 +0900 Subject: [PATCH] Fix normalization error Refer to https://github.com/resibots/robdyn/issues/3 --- src/ode/ode/src/odemath.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ode/ode/src/odemath.h b/src/ode/ode/src/odemath.h index c5f7a77b301..36ebb76e639 100644 --- a/src/ode/ode/src/odemath.h +++ b/src/ode/ode/src/odemath.h @@ -32,12 +32,16 @@ int _dSafeNormalize4 (dVector4 a); ODE_PURE_INLINE void _dNormalize3(dVector3 a) { int bNormalizationResult = _dSafeNormalize3(a); + if(bNormalizationResult==false) + throw(3); dIVERIFY(bNormalizationResult); } ODE_PURE_INLINE void _dNormalize4(dVector4 a) { int bNormalizationResult = _dSafeNormalize4(a); + if(bNormalizationResult==false) + throw(4); dIVERIFY(bNormalizationResult); }