| 273 | |
| 274 | template <class T> |
| 275 | static Color4<T> |
| 276 | addTuple(Color4<T> &color, const tuple &t) |
| 277 | { |
| 278 | MATH_EXC_ON; |
| 279 | if(t.attr("__len__")() == 4) |
| 280 | return Color4<T>(color.r + extract<T>(t[0]), |
| 281 | color.g + extract<T>(t[1]), |
| 282 | color.b + extract<T>(t[2]), |
| 283 | color.a + extract<T>(t[3])); |
| 284 | else |
| 285 | throw std::invalid_argument ("Color4 expects tuple of length 4"); |
| 286 | } |
| 287 | |
| 288 | template <class T> |
| 289 | static Color4<T> |
nothing calls this directly
no outgoing calls
no test coverage detected