Merge pull request #821 from erwincoumans/master

remove some useless global constants, move them right into the constructor
This commit is contained in:
erwincoumans
2016-10-07 17:30:13 -07:00
committed by GitHub
2 changed files with 4 additions and 6 deletions

View File

@@ -30,8 +30,7 @@ namespace
}
}
const btScalar btPolarDecomposition::DEFAULT_TOLERANCE = btScalar(0.0001);
const unsigned int btPolarDecomposition::DEFAULT_MAX_ITERATIONS = 16;
btPolarDecomposition::btPolarDecomposition(btScalar tolerance, unsigned int maxIterations)
: m_tolerance(tolerance)

View File

@@ -14,8 +14,7 @@
class btPolarDecomposition
{
public:
static const btScalar DEFAULT_TOLERANCE;
static const unsigned int DEFAULT_MAX_ITERATIONS;
/**
* Creates an instance with optional parameters.
@@ -25,8 +24,8 @@ class btPolarDecomposition
* @param maxIterations - the maximum number of iterations used to achieve
* convergence
*/
btPolarDecomposition(btScalar tolerance = DEFAULT_TOLERANCE,
unsigned int maxIterations = DEFAULT_MAX_ITERATIONS);
btPolarDecomposition(btScalar tolerance = btScalar(0.0001),
unsigned int maxIterations = 16);
/**
* Decomposes a matrix into orthogonal and symmetric, positive-definite