Skip to content

Instantly share code, notes, and snippets.

@polymerchm
polymerchm / ui_draw_arrow.py
Created May 24, 2015 11:45
ui_draw_arrow.py
# coding: utf-8
import math
import ui
def getAngle(a,b): # a = start, b = finish
theta = math.atan2(b[1]-a[1], b[0]-a[0])
if theta < 0:
theta -= math.pi/2
elif theta >= 0:
@polymerchm
polymerchm / ui_draw_arrow.py
Created May 23, 2015 21:00
ui_draw_arrow.py
# coding: utf-8
import math
import ui
def getAngle(a,b): # a = start, b = finish
theta = math.atan2(b[1]-a[1], b[0]-a[0])
if theta < 0:
theta -= math.pi/2
elif theta >= 0: