MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _rpt

Function _rpt

SLiCAP/schematic/connectivity.py:8–10  ·  view source on GitHub ↗

Round a scene point to the nearest integer grid key.

(p: QPointF)

Source from the content-addressed store, hash-verified

6
7
8def _rpt(p: QPointF) -> tuple[int, int]:
9 """Round a scene point to the nearest integer grid key."""
10 return (round(p.x()), round(p.y()))
11
12
13def _on_segment(p1: QPointF, p2: QPointF, q: QPointF) -> bool:

Callers 4

resolve_netsFunction · 0.85
_nodeFunction · 0.85
_sync_port_net_namesMethod · 0.85
_wires_on_same_netMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected