< prev index next >
src/java.desktop/share/classes/sun/java2d/marlin/CollinearSimplifier.java
Print this page
*** 144,154 ****
}
}
private static float getSlope(float x1, float y1, float x2, float y2) {
float dy = y2 - y1;
! if (dy == 0f) {
return (x2 > x1) ? Float.POSITIVE_INFINITY
: Float.NEGATIVE_INFINITY;
}
return (x2 - x1) / dy;
}
--- 144,154 ----
}
}
private static float getSlope(float x1, float y1, float x2, float y2) {
float dy = y2 - y1;
! if (dy == 0.0f) {
return (x2 > x1) ? Float.POSITIVE_INFINITY
: Float.NEGATIVE_INFINITY;
}
return (x2 - x1) / dy;
}
< prev index next >