Lines Matching refs:sign
28 assertEquals("Infinity", String(1/Math.sign(0)));
29 assertEquals("-Infinity", String(1/Math.sign(-0)));
30 assertEquals(1, Math.sign(100));
31 assertEquals(-1, Math.sign(-199));
32 assertEquals(1, Math.sign(100.1));
33 assertTrue(isNaN(Math.sign("abc")));
34 assertTrue(isNaN(Math.sign({})));
35 assertEquals(0, Math.sign([]));
36 assertEquals(1, Math.sign([1]));
37 assertEquals(-1, Math.sign([-100.1]));
38 assertTrue(isNaN(Math.sign([1, 1])));
39 assertEquals(1, Math.sign({ toString: function() { return "100"; } }));
40 assertEquals(1, Math.sign({ toString: function() { return 100; } }));
41 assertEquals(-1, Math.sign({ valueOf: function() { return -1.1; } }));
42 assertEquals(-1, Math.sign({ valueOf: function() { return "-1.1"; } }));
43 assertEquals(-1, Math.sign(-Infinity));
44 assertEquals(1, Math.sign(Infinity));
45 assertEquals(-1, Math.sign("-Infinity"));
46 assertEquals(1, Math.sign("Infinity"));