subtract method
Returns the difference between this
and other
, using width and height.
maximumDifferences
If true will return the maximum difference,
instead of the minimum difference.
Implementation
int subtract(Dimension other, [bool maximumDifferences = false]) {
var dw = width - other.width;
var dh = height - other.height;
var d = maximumDifferences ? Math.min(dw, dh) : Math.max(dw, dh);
return d;
}