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

Function addTuple

src/python/PyImath/PyImathColor3.cpp:200–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199template <class T>
200static Color3<T>
201addTuple(Color3<T> &color, const tuple &t)
202{
203 MATH_EXC_ON;
204 if(t.attr("__len__")() == 3)
205 return Color3<T>(color.x + extract<T>(t[0]),
206 color.y + extract<T>(t[1]),
207 color.z + extract<T>(t[2]));
208 else
209 throw std::invalid_argument ("Color3 expects tuple of length 3");
210}
211
212template <class T>
213static Color3<T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected