| 418 | |
| 419 | template <class T> |
| 420 | static Color4<T> |
| 421 | mulTuple(Color4<T> &color, const tuple &t) |
| 422 | { |
| 423 | MATH_EXC_ON; |
| 424 | if(t.attr("__len__")() == 4) |
| 425 | return Color4<T>(color.r * extract<T>(t[0]), |
| 426 | color.g * extract<T>(t[1]), |
| 427 | color.b * extract<T>(t[2]), |
| 428 | color.a * extract<T>(t[3])); |
| 429 | else |
| 430 | throw std::invalid_argument ("Color4 expects tuple of length 4"); |
| 431 | } |
| 432 | |
| 433 | template <class T> |
| 434 | static const Color4<T> & |
nothing calls this directly
no outgoing calls
no test coverage detected