diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-26 20:16:10 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-26 20:16:10 +0000 |
commit | 3033ac1f6f071dbb8d2a5227957ccc6800616baa (patch) | |
tree | a8f1aa065eb50ffa2133032f944314eeb3f7570c /src/Java/gtPlusPlus/core | |
parent | bcc175906ebfac6f04ddf1c0184ca15fd946ac19 (diff) | |
download | GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.tar.gz GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.tar.bz2 GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.zip |
% Overhauled Multiblock Tooltips.
% Overhauled Multiblock structural checks, they are now able to utilise my Blueprint system for much faster, cleaner checks.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/data/ArrayUtils.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java b/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java index 52316c8a43..1ff67892e7 100644 --- a/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java +++ b/src/Java/gtPlusPlus/core/util/data/ArrayUtils.java @@ -51,6 +51,19 @@ public class ArrayUtils { } return c; } + + public static <T> T[][] rotateArrayClockwise(T[][] mat) { + final int M = mat.length; + final int N = mat[0].length; + @SuppressWarnings("unchecked") + T[][] ret = (T[][]) new Object[N][M]; + for (int r = 0; r < M; r++) { + for (int c = 0; c < N; c++) { + ret[c][M-1-r] = mat[r][c]; + } + } + return ret; + } } |