The simplest way is to use a framing square, for small offsets. Larger ones can be done using a tape measrure, and anything that makes a 90* angle - tool box, work bench, corner of a room, etc.
Ordinary 45* offsets, such as 8" (for example), can be done with a square. 8" down the blade, 8" down the tongue (use either the inside or outside scales for both - don't use the inside for one and the outside for the other), and measure across the diagonal with a tape. 11-5/16". Take away for the two 45*s, and that's the length that needs to be cut. For larger offsets, say 48", measure down the walls of a room each way from the corner. Lay the tape measure across the diagonal, and that's the centre to centre.
Rolling offsets need one more step. For small ones, a framing square is again the simplest way. An 8" roll with a 15" set laid off on a square will show 17" when measured across, diagonally. Multiply this dimension by 1.414.
17 X 1.414 = 24.038". This is 24-1/32", which will be the centre to centre dimension.
These examples are from "The Pipe Fitter's And Welder's Handbook" and the "Pipe Trades Pocket Manual", both by Thomas Frankland. The single best book I've seen on pipefitting the "Pipe Trades Handbook" by IPT.
To determine the roll and set dimensions (I remember "roll out" for horizontal component and "set down" or "set up" for the vertical component), measure from the center line of each pipe to a common reference. For the roll, it's usually a wall, beam, or an existing parallel line. Subtract the two measurements, and that's the centre to centre horizontal component. The set is obtained the same way, usually using the floor, or ceiling.
The percentage of people in the pipe trades who can't figure an offset is very large. The number of people who can't figure a rolling offset is HUGE. There are some ugly, ugly piping installations out there.