Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 313731 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/draw2d/geometry/Geometry.java (-3 / +3 lines)
Lines 160-168 Link Here
160
		int v1y = y2 - y1;
160
		int v1y = y2 - y1;
161
		int v2x = px - x1;
161
		int v2x = px - x1;
162
		int v2y = py - y1;
162
		int v2y = py - y1;
163
		int numerator = v2x * v1y - v1x * v2y;
163
		long numerator = (long) v2x * v1y - v1x * v2y;
164
		int denominator = v1x * v1x + v1y * v1y;
164
		long denominator = (long) v1x * v1x + v1y * v1y;
165
		int squareDistance = (int) ((long) numerator * numerator / denominator);
165
		long squareDistance = numerator * numerator / denominator;
166
		return squareDistance <= tolerance * tolerance;
166
		return squareDistance <= tolerance * tolerance;
167
	}
167
	}
168
168

Return to bug 313731