blob: a776ba1ce9fe6a638b315d55ffb939f9e3bcfb96 [file] [log] [blame]
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/**
* @assertion double atan2(num a, num b)
* Returns NaN if either argument is NaN.
* @description Checks result if one of arguments is NaN.
* @author msyabro
*/
import "dart:math" as Math;
import "../../Utils/expect.dart";
main() {
Expect.isTrue(Math.atan2(double.nan, double.infinity).isNaN);
Expect.isTrue(Math.atan2(double.nan, double.negativeInfinity).isNaN);
Expect.isTrue(Math.atan2(double.nan, 1).isNaN);
Expect.isTrue(Math.atan2(double.infinity, double.nan).isNaN);
Expect.isTrue(Math.atan2(double.negativeInfinity, double.nan).isNaN);
Expect.isTrue(Math.atan2(1, double.nan).isNaN);
Expect.isTrue(Math.atan2(double.nan, double.nan).isNaN);
}