MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / NavScoreItemDistInterval

Function NavScoreItemDistInterval

KBotExt/imgui/imgui.cpp:10835–10842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10833}
10834
10835static float inline NavScoreItemDistInterval(float cand_min, float cand_max, float curr_min, float curr_max)
10836{
10837 if (cand_max < curr_min)
10838 return cand_max - curr_min;
10839 if (curr_max < cand_min)
10840 return cand_min - curr_max;
10841 return 0.0f;
10842}
10843
10844// Scoring function for gamepad/keyboard directional navigation. Based on https://gist.github.com/rygorous/6981057
10845static bool ImGui::NavScoreItem(ImGuiNavItemData* result)

Callers 1

NavScoreItemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected