atan2 method
Element-wise atan2
Implementation
Matrix atan2(Matrix other) {
if (rowCount != other.rowCount || columnCount != other.columnCount) {
throw ArgumentError('Matrix dimensions must match for atan2');
}
Matrix result = Matrix.zeros(rowCount, columnCount, isDouble: true);
for (int i = 0; i < rowCount; i++) {
for (int j = 0; j < columnCount; j++) {
result[i][j] = math.atan2(this[i][j], other[i][j]);
}
}
return result;
}