MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / position

Method position

tools/python-3.11.9-amd64/Tools/demo/sortvisu.py:324–329  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

322 return outcome
323
324 def position(self):
325 x1 = (self.index+1)*XGRID - WIDTH//2
326 x2 = x1+WIDTH
327 y2 = (self.array.maxvalue+1)*YGRID
328 y1 = y2 - (self.value)*YGRID
329 return x1, y1, x2, y2
330
331 def nearestindex(self, x):
332 return int(round(float(x)/XGRID)) - 1

Callers 9

__init__Method · 0.95
mouse_upMethod · 0.95
setindexMethod · 0.95
swapwithMethod · 0.95
designMethod · 0.45
mainFunction · 0.45
show_leftMethod · 0.45
show_rightMethod · 0.45
show_pivotMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected