Skip to content

Commit b868d2f

Browse files
committed
Simplify code.
1 parent 13d240d commit b868d2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal/LinearTicks.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,10 @@ public static double selectNiceStep(final double min_distance)
269269
{
270270
final double log = Math.log10(min_distance);
271271
final double order_of_magnitude = Math.pow(10, Math.floor(log));
272-
final double step = min_distance / order_of_magnitude;
273272
for (int i=0; i<NICE_STEPS.length; ++i)
274273
if (NICE_STEPS[i] * order_of_magnitude >= min_distance)
275274
return NICE_STEPS[i] * order_of_magnitude;
276-
return step * order_of_magnitude;
275+
return min_distance;
277276
}
278277

279278
/** Create decimal format

0 commit comments

Comments
 (0)