| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: If y is +0 and x>0, Math.atan2(y,x) is +0 |
| 6 |
es5id: 15.8.2.5_A4 |
| 7 |
description: Checking if Math.atan2(y,x) equals to +0, where y is +0 and x>0 |
| 8 |
---*/ |
| 9 |
|
| 10 |
// CHECK#1 |
| 11 |
var y = +0; |
| 12 |
var x = new Array(); |
| 13 |
x[0] = 0.000000000000001; |
| 14 |
x[2] = +Infinity; |
| 15 |
x[1] = 1; |
| 16 |
var xnum = 3; |
| 17 |
|
| 18 |
for (var i = 0; i < xnum; i++) |
| 19 |
{ |
| 20 |
assert.sameValue(Math.atan2(y, x[i]), 0, x[i]); |
| 21 |
} |