MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / testMultiply

Method testMultiply

src/LinearMath/btReducedVector.cpp:135–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135bool btReducedVector::testMultiply() const
136{
137 int sz = 5;
138 btAlignedObjectArray<int> id1;
139 id1.push_back(1);
140 id1.push_back(3);
141 btAlignedObjectArray<btVector3> v1;
142 v1.push_back(btVector3(1,0,1));
143 v1.push_back(btVector3(3,1,5));
144 btScalar s = 2;
145 btReducedVector rv1(sz, id1, v1);
146 btAlignedObjectArray<int> id2;
147 id2.push_back(1);
148 id2.push_back(3);
149 btAlignedObjectArray<btVector3> v2;
150 v2.push_back(btVector3(2,0,2));
151 v2.push_back(btVector3(6,2,10));
152 btReducedVector ans(sz, id2, v2);
153 bool ret = (ans == rv1*s);
154 if (!ret)
155 printf("btReducedVector testMultiply failed\n");
156 return ret;
157}
158
159void btReducedVector::test() const
160{

Callers

nothing calls this directly

Calls 2

btVector3Function · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected