how to measure if a wooden deck will be square?

If all four sides are the same length and one of the angles is 90 degrees. Or all angle are 90 degrees and two adjacent sides are of equal length.