(float x1, float y1, float x2, float y2)
| 109 | } |
| 110 | |
| 111 | public static float distance(float x1, float y1, float x2, float y2) |
| 112 | { |
| 113 | final float dx = (x2 - x1); |
| 114 | final float dy = (y2 - y1); |
| 115 | // return (float) Math.hypot(x, y); // number too big consideration |
| 116 | return (float) Math.sqrt(dx * dx + dy * dy); |
| 117 | } |
| 118 | |
| 119 | public static float distance(PointF p1, PointF p2) |
| 120 | { |