MCPcopy Create free account
hub / github.com/PageBot/PageBot / atan2

Function atan2

Lib/pagebot/toolbox/units.py:2300–2310  ·  view source on GitHub ↗

Answers a Radians instance, using math.atan2(v1, v2). >>> atan2(1, 1).degrees 45 >>> atan2(100, -100).degrees 135 >>> atan2(-100, 100).degrees -45

(v1, v2)

Source from the content-addressed store, hash-verified

2298 return radians(math.atan(v)/math.pi)
2299
2300def atan2(v1, v2):
2301 """Answers a Radians instance, using math.atan2(v1, v2).
2302
2303 >>> atan2(1, 1).degrees
2304 45
2305 >>> atan2(100, -100).degrees
2306 135
2307 >>> atan2(-100, 100).degrees
2308 -45
2309 """
2310 return radians(math.atan2(v1, v2)/math.pi)
2311
2312class Angle:
2313

Callers 3

drawArrowFunction · 0.85
drawArrowMethod · 0.85
drawArrowMethod · 0.85

Calls 1

radiansFunction · 0.85

Tested by

no test coverage detected