Exemplo n.º 1
0
    static Rotator()
    {
        var rotation   = ArrayExt.Range(0, MaxPositions);
        var sideLength = MathF.Sqrt(MaxPositions).RoundToInt();

        for (var rot = 0; rot < MaxRotations; rot++)
        {
            for (var pos = 0; pos < MaxPositions; pos++)
            {
                RotationsArray[pos * MaxRotations + rot] = rotation[pos];
            }
            rotation = rotation.RotateClockwise(sideLength);
        }
    }