r.add(target.tmp().mul(alpha));\r
return r;\r
}\r
+ \r
+ /**\r
+ * Compares this vector with the other vector, using the supplied\r
+ * epsilon for fuzzy equality testing.\r
+ * @param obj\r
+ * @param epsilon\r
+ * @return whether the vectors are the same.\r
+ */\r
+ public boolean epsilonEquals(Vector2 obj, float epsilon) {\r
+ if(obj == null) return false;\r
+ if(Math.abs(obj.x - x) > epsilon) return false;\r
+ if(Math.abs(obj.y - y) > epsilon) return false;\r
+ return true;\r
+ }\r
}\r
return true;\r
}\r
\r
+ /**\r
+ * Compares this vector with the other vector, using the supplied\r
+ * epsilon for fuzzy equality testing.\r
+ * @param obj\r
+ * @param epsilon\r
+ * @return whether the vectors are the same.\r
+ */\r
public boolean epsilonEquals(Vector3 obj, float epsilon) {\r
if(obj == null) return false;\r
if(Math.abs(obj.x - x) > epsilon) return false;\r