Pārlūkot izejas kodu

added atan2 tests (#6292)

Nicolas Cannasse 8 gadi atpakaļ
vecāks
revīzija
7628a8e925
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      tests/unit/src/unitstd/Math.unit.hx

+ 7 - 0
tests/unit/src/unitstd/Math.unit.hx

@@ -432,3 +432,10 @@ math.isNaN(math.POSITIVE_INFINITY) == false;
 math.isNaN(math.NEGATIVE_INFINITY) == false;
 math.isNaN(math.NaN) == true;
 math.isNaN(0.0) == false;
+
+// atan2
+math.atan2(0,1) == 0;
+math.atan2(0,1000) == 0;
+math.atan2(1,0) == Math.PI/2;
+math.atan2(-1,0) == -Math.PI/2;
+math.atan2(0,0) == 0;