OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 0.7071067811865476, | 232 0.7071067811865476, |
233 DONT_ENUM | DONT_DELETE | READ_ONLY); | 233 DONT_ENUM | DONT_DELETE | READ_ONLY); |
234 %SetProperty($Math, | 234 %SetProperty($Math, |
235 "SQRT2", | 235 "SQRT2", |
236 1.4142135623730951, | 236 1.4142135623730951, |
237 DONT_ENUM | DONT_DELETE | READ_ONLY); | 237 DONT_ENUM | DONT_DELETE | READ_ONLY); |
238 %ToFastProperties($Math); | 238 %ToFastProperties($Math); |
239 | 239 |
240 // Set up non-enumerable functions of the Math object and | 240 // Set up non-enumerable functions of the Math object and |
241 // set their names. | 241 // set their names. |
242 InstallFunctionsOnHiddenPrototype($Math, DONT_ENUM, $Array( | 242 InstallFunctions($Math, DONT_ENUM, $Array( |
243 "random", MathRandom, | 243 "random", MathRandom, |
244 "abs", MathAbs, | 244 "abs", MathAbs, |
245 "acos", MathAcos, | 245 "acos", MathAcos, |
246 "asin", MathAsin, | 246 "asin", MathAsin, |
247 "atan", MathAtan, | 247 "atan", MathAtan, |
248 "ceil", MathCeil, | 248 "ceil", MathCeil, |
249 "cos", MathCos, | 249 "cos", MathCos, |
250 "exp", MathExp, | 250 "exp", MathExp, |
251 "floor", MathFloor, | 251 "floor", MathFloor, |
252 "log", MathLog, | 252 "log", MathLog, |
253 "round", MathRound, | 253 "round", MathRound, |
254 "sin", MathSin, | 254 "sin", MathSin, |
255 "sqrt", MathSqrt, | 255 "sqrt", MathSqrt, |
256 "tan", MathTan, | 256 "tan", MathTan, |
257 "atan2", MathAtan2, | 257 "atan2", MathAtan2, |
258 "pow", MathPow, | 258 "pow", MathPow, |
259 "max", MathMax, | 259 "max", MathMax, |
260 "min", MathMin | 260 "min", MathMin |
261 )); | 261 )); |
262 } | 262 } |
263 | 263 |
264 SetUpMath(); | 264 SetUpMath(); |
OLD | NEW |