MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / multTuple

Function multTuple

src/python/PyImath/PyImathShear.cpp:316–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314
315template <class T>
316static Shear6<T>
317multTuple(Shear6<T> &v, tuple t)
318{
319 MATH_EXC_ON;
320 Shear6<T> w;
321
322 if(t.attr("__len__")() == 6){
323 w[0] = v[0] * extract<T>(t[0]);
324 w[1] = v[1] * extract<T>(t[1]);
325 w[2] = v[2] * extract<T>(t[2]);
326 w[3] = v[3] * extract<T>(t[3]);
327 w[4] = v[4] * extract<T>(t[4]);
328 w[5] = v[5] * extract<T>(t[5]);
329 }
330 else
331 throw std::domain_error ("tuple must have length of 6");
332
333 return w;
334}
335
336template <class T>
337static Shear6<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected