prob = exp(-dE / kT);
%define probability as prob = e^(-dE/kT), where dE and kT are some value
if dE <= 0 || rand() <= prob
%if dE <= 0, OR a uniformly distributed random number from 0 to 1 is <= prob
spin(row, col) = - spin(row, col);
%negate the sign of the value stored at (row, col) position of a matrix called spin
end
%end of the if statement
