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

Function divTupleR

src/python/PyImath/PyImathColor4.cpp:480–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478
479template <class T>
480static Color4<T>
481divTupleR(Color4<T> &color, const tuple &t)
482{
483 MATH_EXC_ON;
484 if(t.attr("__len__")() == 4)
485 return Color4<T>(extract<T>(t[0]) / color.r,
486 extract<T>(t[1]) / color.g,
487 extract<T>(t[2]) / color.b,
488 extract<T>(t[3]) / color.a);
489 else
490 throw std::invalid_argument ("Color4 expects tuple of length 4");
491}
492
493template <class T>
494static Color4<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected