Name

atan2()

Examples
def draw(): 
    background(204)
    translate(width/2, height/2)
    a = atan2(mouseY-height/2, mouseX-width/2)
    rotate(a)
    rect(-30, -5, 60, 10)
Description
Syntax
atan2(y, x)
Parameters
y
x
Related tan()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License