{"author_name":"delpes","cat":"LD #22","comments":[{"author_name":"","time":"December 17, 2011 9:34 am","epoch":1324132440,"text":"i think you are looking for atan2(); google it!","spam":"N"},{"author_name":"","time":"December 17, 2011 9:36 am","epoch":1324132560,"text":"Very quick, some pseudo code.. Not sure if it helps or not.","spam":"N"},{"author_name":"","time":"December 17, 2011 9:36 am","epoch":1324132560,"text":"float dx = from.getX() &#8211; to.getX();<br \/>\n float dy = from.getY() &#8211; to.getY();<br \/>\n return (float) Math.toDegrees(Math.atan2(dy, dx)) &#8211; 90;","spam":"N"},{"author_name":"delpes","time":"December 17, 2011 10:19 am","epoch":1324135140,"text":"I really don&#8217;t get my head around this. I think i&#8217;ve been awake for far too long now.","spam":"N"}],"epoch":1324132320,"likes":0,"metadata":{"p_key":"61650","p_author":"delpes","p_authorkey":"8513","p_urlkey":"97415","p_title":"Help with Math","p_cat":"LD #22","p_event":"LD22","p_time":"1324132320","p_likes":"0","p_comments":"4","p_status":"UPD5","us_key":"8513","us_name":"delpes","us_username":"delpes","event_start":"1323993600","event_key":"8","event_name":"LD22"},"text":"<p>Hi,<\/p>\n <p>&nbsp;<\/p>\n <p>my idea is visualising but i&#8217;m stuck at a very simple math problem:<\/p>\n <p>From the center (200,150) i want to spawn objects an move them direction mouseclick \u00a0until they hit the border of the screen.<\/p>\n <p>I&#8217;m able to increment x, y correctly, what i&#8217;m not able to do is to let the object move in the correct direction the mouse was clicked.<\/p>\n <p>&nbsp;<\/p>\n <p>Hope someone can help me <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>","time":"December 17th, 2011 9:32 am","title":"Help with Math"}