MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setSaturation

Method setSaturation

source/core/StarColor.cpp:406–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void Color::setSaturation(float s) {
407 auto hsva = toHsva();
408 *this = Color::hsva(hsva[0], clamp(s, 0.0f, 1.0f), hsva[2], alphaF());
409}
410
411void Color::setValue(float v) {
412 auto hsva = toHsva();

Callers 5

renderObjectPreviewsMethod · 0.80
beamDrawablesMethod · 0.80
renderWireMethod · 0.80
mainFunction · 0.80
processSaturationShiftFunction · 0.80

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected