Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: src/harmony-math.js

Issue 358423003: Implement the `Math.TAU` constant. Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/math-tau.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-math.js
diff --git a/src/harmony-math.js b/src/harmony-math.js
index 4a8d95bc01a997b02512ac20f76a0e6a0ec8eb61..fa4725f8e767066d7573e67632b9e8679d03f6f9 100644
--- a/src/harmony-math.js
+++ b/src/harmony-math.js
@@ -221,6 +221,11 @@ function MathLog1p(x) {
function ExtendMath() {
%CheckIsBootstrapping();
+ // Set up math constants.
+ InstallConstants($Math, $Array(
+ "TAU", 6.283185307179586
+ ));
+
// Set up the non-enumerable functions on the Math object.
InstallFunctions($Math, DONT_ENUM, $Array(
"sign", MathSign,
« no previous file with comments | « no previous file | test/mjsunit/harmony/math-tau.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698