Constrain a color value from 0 to 255
| 75 | |
| 76 | // Constrain a color value from 0 to 255 |
| 77 | int EffectBase::constrain(int color_value) |
| 78 | { |
| 79 | // Constrain new color from 0 to 255 |
| 80 | if (color_value < 0) |
| 81 | color_value = 0; |
| 82 | else if (color_value > 255) |
| 83 | color_value = 255; |
| 84 | |
| 85 | return color_value; |
| 86 | } |
| 87 | |
| 88 | // Generate JSON string of this object |
| 89 | std::string EffectBase::Json() const { |
nothing calls this directly
no outgoing calls
no test coverage detected