MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_cos_sin

Function get_cos_sin

lib/matplotlib/bezier.py:519–525  ·  view source on GitHub ↗
(x0, y0, x1, y1)

Source from the content-addressed store, hash-verified

517# quadratic Bezier lines
518
519def get_cos_sin(x0, y0, x1, y1):
520 dx, dy = x1 - x0, y1 - y0
521 d = (dx * dx + dy * dy) ** .5
522 # Account for divide by zero
523 if d == 0:
524 return 0.0, 0.0
525 return dx / d, dy / d
526
527
528def check_if_parallel(dx1, dy1, dx2, dy2, tolerance=1.e-5):

Callers 3

_get_bracketMethod · 0.85
get_parallelsFunction · 0.85
make_wedged_bezier2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…