private async Task <Matrix> Rotate(int rows, int cols, int rotations) { Matrix matrix = new Matrix(rows, cols); MatrixRotate matrixRotate = new MatrixRotate(matrix); await matrixRotate.Rotate(rotations); return(matrixRotate.Matrix); }
static async Task matrixRotation(int rows, int columns, bool random, int rotations, bool print) { var watch = System.Diagnostics.Stopwatch.StartNew(); Matrix matrix = new Matrix(rows, columns, random); MatrixRotate matrixRotation = new MatrixRotate(matrix, print); await matrixRotation.Rotate(rotations); watch.Stop(); Console.Write($"\r\n Time execution: {watch.ElapsedMilliseconds} ms \r\n"); }