Util

dotty.tools.dotc.util.Util
object Util

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Util.type

Members list

Value members

Concrete methods

def bestFit(candidates: Array[Int], length: Int, x: Int, hint: Int): Int

The index i in candidates.indices such that candidates(i) <= x and candidates(i) is closest to x, determined by binary search, or -1 if x < candidates(0).

The index i in candidates.indices such that candidates(i) <= x and candidates(i) is closest to x, determined by binary search, or -1 if x < candidates(0).

Value parameters

hint

If between 0 and candidates.length use this as the first search point, otherwise use candidates.length/2.

Attributes