View Single Post
  #3   Spotlight this post!  
Unread 22-09-2013, 11:20
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Converting Two joystick values into a vector

Here's a java example

Code:
public double getTheta(double x, double y){
        return com.sun.squawk.util.MathUtils.atan2(y, x);
    }
    
    public double getR(double x, double y){
        return Math.sqrt((x*x)+(y*y));
    }