[Webkit-unassigned] [Bug 137967] Use constants from wtf/MathExtras.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 28 09:26:19 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=137967

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #240545|review?, commit-queue?      |review+, commit-queue+
              Flags|                            |

--- Comment #14 from Darin Adler <darin at apple.com> ---
Comment on attachment 240545
  --> https://bugs.webkit.org/attachment.cgi?id=240545
proposed patch V

It’s OK to do this; it does follow the style already used in MathExtras.h.

Longer term, it would be better to change our approach so that MathExtras.h fills in holes in the implementations of platforms that lack constants like M_SQRT2; I think that it’s better for us to use the standard or de-factor standard names and have MathExtras.h make that work cross-platform rather than adding new new names of our own.

I’m wondering how this is best done in C++. Maybe std::sqrt(2.0) and std::sqrt(2.0f) are intended to be used as constexpr in C++?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141028/9d4c2363/attachment-0002.html>


More information about the webkit-unassigned mailing list