It was second degree affinity. You have to first understand that the laws concerning consanguinity and affinity, as impediments to marriage, changed over time. So the number of prohibited degrees of consanguinity or affinity that would bar a particular marriage and the method of computing them would depend on the time in which the marriage was contracted. At the time of William’s betrothal to Matilda of Flanders the canon laws were the most restrictive at seven degrees (meaning you could not marry up to a sixth cousin or a wife’s sixth cousin). But William and Matilda had impediments of both consanguinity and affinity.
With respect to the affinity between them, unlike today, cannon law determined that affinity begat affinity. For one thing that meant the relatives of the wife became the relatives of the husband once the marriage was contracted—even if it wasn’t consummated. For example a wife’s children by a former marriage were the husband’s children, her parents were his parents, her in-laws from that marriage were now his, her cousins his cousins. In other words relationships through marriage were treated the same as if they were blood relations. What we might term today 'extended family' was to them at that time family.
Jim