Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
406
void 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
411
void Color::setValue(float v) {
412
auto hsva = toHsva();
Callers
5
renderObjectPreviews
Method · 0.80
beamDrawables
Method · 0.80
renderWire
Method · 0.80
main
Function · 0.80
processSaturationShift
Function · 0.80
Calls
1
clamp
Function · 0.85
Tested by
no test coverage detected