MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / calc_color

Function calc_color

ogsr_engine/xrGame/ui/UIProgressShape.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46float calc_color(u32 idx, u32 total, float stage, float max_stage, bool blend)
47{
48 float kk = (stage / max_stage) * (float(total + 1));
49 if (blend)
50 {
51 return (1 / (exp((float(idx) - kk) * 0.9f) + 1.0f));
52 }
53
54 if ((float)idx < kk)
55 {
56 return 1.0f;
57 }
58 return 0.0f;
59}
60
61void CUIProgressShape::Draw()
62{

Callers 1

DrawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected