MCPcopy Create free account
hub / github.com/antirez/ds4 / project

Function project

speed-bench/plot_speed.py:92–96  ·  view source on GitHub ↗
(point)

Source from the content-addressed store, hash-verified

90 left, top, width, height = plot
91
92 def project(point):
93 x, y = point
94 px = left + (x - x_min) / (x_max - x_min) * width
95 py = top + height - y / y_max * height
96 return f"{px:.2f},{py:.2f}"
97
98 return " ".join(project(point) for point in points)
99

Callers 1

points_to_polylineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected