From 13936eb9a5f7ff15c1d3a40e9b25a2cceb4af74b Mon Sep 17 00:00:00 2001 From: "erwin.coumans@gmail.com" Date: Tue, 29 Oct 2013 22:53:01 +0000 Subject: [PATCH] use square epsilon in btVector3::fuzzyZero (length2) --- src/LinearMath/btMatrixX.h | 21 +++++++++++++++++++-- src/LinearMath/btVector3.h | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/LinearMath/btMatrixX.h b/src/LinearMath/btMatrixX.h index 7d7500788..52cc79b3a 100644 --- a/src/LinearMath/btMatrixX.h +++ b/src/LinearMath/btMatrixX.h @@ -22,7 +22,7 @@ subject to the following restrictions: //#define BT_DEBUG_OSTREAM #ifdef BT_DEBUG_OSTREAM -#include +#include #include // std::setw #endif //BT_DEBUG_OSTREAM @@ -616,7 +616,7 @@ typedef btVectorX btVectorXd; #ifdef BT_DEBUG_OSTREAM template -std::ostream& operator<< (std::ostream& os, btMatrixX& mat) +std::ostream& operator<< (std::ostream& os, const btMatrixX& mat) { os << " ["; @@ -633,6 +633,23 @@ std::ostream& operator<< (std::ostream& os, btMatrixX& mat) os << " ]"; //printf("\n---------------------\n"); + return os; + } +template +std::ostream& operator<< (std::ostream& os, const btVectorX& mat) + { + + os << " ["; + //printf("%s ---------------------\n",msg); + for (int i=0;i