MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / bsearch

Method bsearch

core/variant/array.cpp:755–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755int Array::bsearch(const Variant &p_value, bool p_before) const {
756 Variant value = p_value;
757 ERR_FAIL_COND_V(!_p->typed.validate(value, "binary search"), -1);
758 return _p->array.span().bisect<_ArrayVariantSort>(value, p_before);
759}
760
761int Array::bsearch_custom(const Variant &p_value, const Callable &p_callable, bool p_before) const {
762 Variant value = p_value;

Callers 1

test_vector.hFile · 0.45

Calls 2

validateMethod · 0.45
spanMethod · 0.45

Tested by

no test coverage detected