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

Function mulTuple

src/python/PyImath/PyImathColor4.cpp:420–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418
419template <class T>
420static Color4<T>
421mulTuple(Color4<T> &color, const tuple &t)
422{
423 MATH_EXC_ON;
424 if(t.attr("__len__")() == 4)
425 return Color4<T>(color.r * extract<T>(t[0]),
426 color.g * extract<T>(t[1]),
427 color.b * extract<T>(t[2]),
428 color.a * extract<T>(t[3]));
429 else
430 throw std::invalid_argument ("Color4 expects tuple of length 4");
431}
432
433template <class T>
434static const Color4<T> &

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected