Duration of a floating rate note (swaps reading 38)

Eg: EOC reading 38 question 2 How to get the duration of four year pay floating receive fixed swap with quarterly payments. I understood that for fixed leg it is 75% of 4 years. But how did they get 0.125 for the floating leg?

For floating leg you take average of minimum (0) and maximum (cupon pay period). For a quarterly floating leg: (0+0.25)/2 = 0.125

Thnx a lot janardhanc

The general formula is

[(1/Q)/2] - N x 0.75

if semi-annual Q = 2

N is number of years