* @return the distance between this and the other vector\r
*/\r
public float dst (Vector2 v) {\r
- float x_d = v.x - x;\r
- float y_d = v.y - y;\r
+ final float x_d = v.x - x;\r
+ final float y_d = v.y - y;\r
return (float)Math.sqrt(x_d * x_d + y_d * y_d);\r
}\r
\r
* @return the distance between this and the other vector\r
*/\r
public float dst (float x, float y) {\r
- float x_d = x - this.x;\r
- float y_d = y - this.y;\r
+ final float x_d = x - this.x;\r
+ final float y_d = y - this.y;\r
return (float)Math.sqrt(x_d * x_d + y_d * y_d);\r
}\r
\r
* @return the squared distance between this and the other vector\r
*/\r
public float dst2 (Vector2 v) {\r
- float x_d = v.x - x;\r
- float y_d = v.y - y;\r
+ final float x_d = v.x - x;\r
+ final float y_d = v.y - y;\r
return x_d * x_d + y_d * y_d;\r
}\r
\r