Пример #1
0
        [Test] public static void IndexTranslate()
        {
            RectInt R = new RectInt {
                width = 6, height = 6
            };
            RectInt r = new RectInt {
                x = 1, y = 1, width = 3, height = 3
            };

            Assert.AreEqual(new int2(1, 2), NativeGrid.IndexTranslate(r, new int2(0, 1)));
            Assert.AreEqual(20, NativeGrid.IndexTranslate(r, 1, 2, R.width));
        }
 public static int IndexTranslate(RectInt r, INT ri, INT R_width) => NativeGrid.IndexTranslate(r, ri, R_width);
 public static int2 IndexTranslate(RectInt r, INT2 rxy) => NativeGrid.IndexTranslate(r, rxy);