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

Function divTupleL

src/python/PyImath/PyImathColor4.cpp:466–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464
465template <class T>
466static Color4<T>
467divTupleL(Color4<T> &color, const tuple &t)
468{
469 MATH_EXC_ON;
470 if(t.attr("__len__")() == 4)
471 return Color4<T>(color.r / extract<T>(t[0]),
472 color.g / extract<T>(t[1]),
473 color.b / extract<T>(t[2]),
474 color.a / extract<T>(t[3]));
475 else
476 throw std::invalid_argument ("Color4 expects tuple of length 4");
477}
478
479template <class T>
480static Color4<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected