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

Function addTuple

src/python/PyImath/PyImathShear.cpp:278–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276
277template <class T>
278static Shear6<T>
279addTuple(Shear6<T> &v, tuple t)
280{
281 MATH_EXC_ON;
282 Shear6<T> w;
283
284 if(t.attr("__len__")() == 6){
285 w[0] = v[0] + extract<T>(t[0]);
286 w[1] = v[1] + extract<T>(t[1]);
287 w[2] = v[2] + extract<T>(t[2]);
288 w[3] = v[3] + extract<T>(t[3]);
289 w[4] = v[4] + extract<T>(t[4]);
290 w[5] = v[5] + extract<T>(t[5]);
291 }
292 else
293 throw std::domain_error ("tuple must have length of 6");
294
295 return w;
296}
297
298template <class T>
299static Shear6<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected