Re: [Bug 26526] Fix aspect ratio constraint

On 8/11/14 6:17 PM, Martin Thomson wrote:
> On 11 August 2014 14:34, Jan-Ivar Bruaroey <jib@mozilla.com> wrote:
>> Actually, the spec already says: "The exact aspect ratio (width in pixels
>> divided by height in pixels), represented as a double rounded to the tenth
>> decimal place" [1]
>>
>> So we effectively have our epsilon already: .0000000001
>>
>> So no action required it seems.
> Oh, that's good, there's an epsilon; but it's bad.  1.777777778 isn't
> the same as 16/9 based on that.  Nor is 1.7777777777.  Add a single
> digit to either and it would match.  I may have counted wrong.  I'm
> sure that others will too.

Feel free to propose a different epsilon I suppose.

I presume this would have nothing to do with inaccuracies inherent in 
floating-point math then (or we could have picked an epsilon much closer 
to everyone's worst machine epsilon), but instead from a desire to 
accommodate people handwriting rounded decimal numbers for aspect. Just 
so we're clear on the properties we seek.

.: Jan-Ivar :.

Received on Tuesday, 12 August 2014 16:17:59 UTC