Re: [Bug 26526] Fix aspect ratio constraint

On Mon, Aug 11, 2014 at 5:38 PM, Harald Alvestrand <harald@alvestrand.no> wrote:
> On 08/10/2014 11:48 PM, Silvia Pfeiffer wrote:
>
> What's the difference between providing a float to give the aspect ratio and
> a float to provide an epsilon for accuracy to providing two integers to
> provide exact aspect ratio? It's two numbers either way. Actually, two
> integers need less storage, are easier to understand and read by users (you
> could have fooled me with expecting to know that 1.7 is supposed to be
> 16/9), and more accurate. I really don't see where you see the advantage?
>
>
> Actually Javascript doesn't do integers. It just does doubles. So no storage
> saving.

Fair enough. ;-) Though most browsers are implemented in C++ and C++
does care. But never mind.


> Concrete suggestion: I suggest we define epsilon to be 1/1000 of the largest
> number in the comparision. So 1.78 would not match 1.777777777777777, but
> 1.778 would.

Actually, as long as we can continue specifying it as "16/9" and it's
suggested as best practice, I can probably live with that.
I just want it readable and meaningful. Aspect ratios have been
specified as rational numbers in the past for a reason (which I think
is readability).

Silvia.

Received on Monday, 11 August 2014 23:37:30 UTC