MCPcopy Create free account
hub / github.com/comaps/comaps / get_rel

Function get_rel

tools/python/maps_generator/checks/check.py:39–47  ·  view source on GitHub ↗
(r: ResLine)

Source from the content-addressed store, hash-verified

37
38
39def get_rel(r: ResLine) -> bool:
40 rel = 0.0
41 if r.arrow != Arrow.zero:
42 prev = norm(r.previous)
43 if prev == 0:
44 rel = 100.0
45 else:
46 rel = norm(r.diff) * 100.0 / prev
47 return rel
48
49
50class Check(ABC):

Callers 1

formatted_stringMethod · 0.85

Calls 1

normFunction · 0.85

Tested by

no test coverage detected