Selaa lähdekoodia

added atan2 tests (#6292)

Nicolas Cannasse 8 vuotta sitten
vanhempi
commit
7628a8e925
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  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;