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

Function norm

tools/python/maps_generator/checks/check.py:28–36  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

26
27
28def norm(value):
29 if isinstance(value, (int, float)):
30 return abs(value)
31 elif hasattr(value, "__len__"):
32 return len(value)
33 elif hasattr(value, "norm"):
34 return value.norm()
35
36 assert False, type(value)
37
38
39def get_rel(r: ResLine) -> bool:

Callers 3

get_relFunction · 0.85
formatted_stringMethod · 0.85
DrawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected