Is there any difference between:
distance = point1.subtract(point2).length;
and
distance = Point.distance(point1, point2);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since this question is tagged Optimization, the longhand for the pythagorean theorem will be the most efficient way to find the distance between two points in AS3, provided that you don’t:
Almost all the built-in methods are conveniences. They’re not optimized for speed.