w3c / fxtf-drafts

Mirror of https://hg.fxtf.org/drafts
https://drafts.fxtf.org/
Other
71 stars 50 forks source link

[geometry] Use of SameValueZero in "validate and fixup" doesn't make sense #232

Open bzbarsky opened 7 years ago

bzbarsky commented 7 years ago

https://drafts.fxtf.org/geometry/#matrix-validate-and-fixup says things like:

a and m11 are both present and SameValueZero(a, m11) is false.

but a and m11 are both unrestricted double IDL members, so this is passing two doubles to a function that expects two ES values. It should either pass two Number values constructed from a and m11 or it should be using something defined to work on doubles.

dirkschulze commented 6 years ago

@bzbarsky What is the preferred way? Constructing ES number value from a unrestricted double or does WebIDL or another spec provide means to compare unrestricted doubles for "equality"?

bzbarsky commented 6 years ago

I have no idea, actually. Constructing ES number values is probably simple enough...

tabatkins commented 6 years ago

The ES spec has to deal with this sort of thing as well, because it draws a similar distinction between abstract numbers and ES number objects. @littledan, @bterlson, any advice?

(Tagging them in because I think I recall them being involved with some recent edits to make the ES spec more specific in this regard.)