Magic constant: Difference between revisions
Content added Content deleted
(New post.) |
m (Minor code improvement.) |
||
Line 812: | Line 812: | ||
// Return the order of the magic square at the given index |
// Return the order of the magic square at the given index |
||
private static int order(int aIndex) { |
private static int order(int aIndex) { |
||
return |
return ORDER_FIRST_MAGIC_SQUARE + aIndex - 1; |
||
} |
} |
||
private static final int ORDER_FIRST_MAGIC_SQUARE = 3; |
|||
private static final double LN2 = Math.log(2.0); |
private static final double LN2 = Math.log(2.0); |
||
private static final double LN10 = Math.log(10.0); |
private static final double LN10 = Math.log(10.0); |