MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / fraction

Function fraction

common/script/scriptbar.cpp:65–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64
65 float fraction(const ScriptConsole::Layer& layer)
66 {
67 if (layer.total <= 0) {
68 return 0.0f;
69 }
70 return std::clamp((float)layer.done / (float)layer.total, 0.0f, 1.0f);
71 }
72
73 std::string rightText(const ScriptConsole::Layer& layer)
74 {

Callers 3

barMethod · 0.85
barMethod · 0.85
rightTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected