20 return other*(this->
dot(other))/other_length2;
31 *
this /= std::sqrt(this->
length2());
64 bool ret = ((ans == rv1+rv2) && (ans == rv2+rv1));
66 printf(
"btReducedVector testAdd failed\n");
100 bool ret = (ans == rv2-rv1);
102 printf(
"btReducedVector testMinus failed\n");
126 bool ret = (ans == rv2.
dot(rv1) && ans == rv1.
dot(rv2));
128 ret &= (ans==rv2.
dot(rv2));
131 printf(
"btReducedVector testDot failed\n");
153 bool ret = (ans == rv1*s);
155 printf(
"btReducedVector testMultiply failed\n");
164 printf(
"All tests passed\n");
168 printf(
"Tests failed\n");
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
void clear()
clear the array, deallocated memory. Generally it is better to use array.resize(0),...
void push_back(const T &_Val)
btAlignedObjectArray< int > m_indices
btReducedVector proj(const btReducedVector &other) const
btAlignedObjectArray< btVector3 > m_vecs
btScalar dot(const btReducedVector &other) const
bool testMultiply() const
btVector3 can be used to represent 3D points and vectors.