MCPcopy Create free account
hub / github.com/ActiveState/code / Polar2

Function Polar2

recipes/Python/576959_Boids_20_for_Python_31/recipe-576959.py:482–485  ·  view source on GitHub ↗
(magnitude, degrees)

Source from the content-addressed store, hash-verified

480################################################################################
481
482def Polar2(magnitude, degrees):
483 x = magnitude * sin(radians(degrees))
484 y = magnitude * cos(radians(degrees))
485 return Vector2(x, y)
486
487################################################################################
488

Callers 1

build_boidsMethod · 0.70

Calls 3

sinFunction · 0.85
cosFunction · 0.85
Vector2Class · 0.70

Tested by

no test coverage detected