2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: If y is +0 and x>0, Math.atan2(y,x) is +0
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.8.2.5_A4
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Checking if Math.atan2(y,x) equals to +0, where y is +0 and x>0
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
// CHECK#1
|
2015-04-29 17:40:30 +02:00
|
|
|
var y = +0;
|
|
|
|
var x = new Array();
|
2011-09-07 08:35:18 +02:00
|
|
|
x[0] = 0.000000000000001;
|
|
|
|
x[2] = +Infinity;
|
|
|
|
x[1] = 1;
|
2015-04-29 17:40:30 +02:00
|
|
|
var xnum = 3;
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2015-04-29 17:40:30 +02:00
|
|
|
for (var i = 0; i < xnum; i++)
|
2011-09-07 08:35:18 +02:00
|
|
|
{
|
|
|
|
if (Math.atan2(y,x[i]) !== +0)
|
2015-06-09 18:08:02 +02:00
|
|
|
$ERROR("#1: Math.atan2(" + y + ", " + x[i] + ") !== +0");
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|