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

Function mulTuple

src/python/PyImath/PyImathColor3.cpp:340–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339template <class T>
340static Color3<T>
341mulTuple(Color3<T> &color, const tuple &t)
342{
343 MATH_EXC_ON;
344 if(t.attr("__len__")() == 3)
345 return Color3<T>(color.x * extract<T>(t[0]),
346 color.y * extract<T>(t[1]),
347 color.z * extract<T>(t[2]));
348 else
349 throw std::invalid_argument ("Color3 expects tuple of length 3");
350}
351
352template <class T>
353static const Color3<T> &

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected