[svgwg] 8.2 equivalent transform of an SVG viewport, slight ambiguity. (#766)

tatarize has just created a new issue for https://github.com/w3c/svgwg:

== 8.2 equivalent transform of an SVG viewport, slight ambiguity. ==
8.2 equivalent transform of an SVG viewport, step 7 and 8.

* If align is not 'none' and meetOrSlice is 'meet', set the larger of scale-x and scale-y to the smaller.

I initially read this to say:
```
        if align != SVG_VALUE_NONE and meet_or_slice == 'meet':
            scale_x = scale_y = max(scale_x, scale_y)
```

The phrase `larger of scale_x and scale_y` sounded like max(scale_x, scale_y) then set that value to the one that wasn't the max `the smaller` which made sense, because the larger was already set to that. Set the larger value of the variables scale_x and scale_y and set the smaller variable to equal that value. Which is to say both variables have the larger value.

But, debugging clearly takes it to mean `min(scale_x, scale_y)`  Which means I interpreted that wrongly, and it took a few reading for me to see the *other* way to take it. It means find whether scale_x or scale_y is larger then set the value of that larger variable to the value of the smaller variable. Which is to say both variables have the smaller value.


* `set the larger of scale-x and scale-y to the smaller.`
* Set the register holding the larger value to the equal that of the smaller value. 
* Set the register holding the smaller value equal to the larger value of scale_x or scale_y.

The line:
`Otherwise, if align is not 'none' and meetOrSlice is 'slice', set the smaller of scale-x and scale-y to the larger` -- Has the same ambiguity. smaller could be smaller value or register containing the smaller value. And larger could equally mean register containing the larger value or the value which is larger.


Please view or discuss this issue at https://github.com/w3c/svgwg/issues/766 using your GitHub account

Received on Sunday, 15 December 2019 13:35:53 UTC