blob: 51e781f9e8c7d8d74f7c6b83b6162febb93a9dfc [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);
}