Skip to content

Commit 5ec65e4

Browse files
committed
Fix test precision differences across platforms
1 parent 1657a51 commit 5ec65e4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

functions/math/acos.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
function acos(arg) {
22
// discuss at: http://phpjs.org/functions/acos/
33
// original by: Onno Marsman
4-
// example 1: acos(0.3);
5-
// returns 1: 1.2661036727794992
4+
// note: Sorry about the crippled test. Needed because precision differs accross platforms.
5+
// example 1: (acos(0.3) + '').substr(0, 17);
6+
// returns 1: "1.266103672779499"
67

78
return Math.acos(arg);
8-
}
9+
}

functions/math/asin.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
function asin(arg) {
22
// discuss at: http://phpjs.org/functions/asin/
33
// original by: Onno Marsman
4-
// example 1: asin(0.3);
5-
// returns 1: 0.3046926540153975
4+
// note: Sorry about the crippled test. Needed because precision differs accross platforms.
5+
// example 1: (asin(0.3) + '').substr(0, 17);
6+
// returns 1: "0.304692654015397"
67

78
return Math.asin(arg);
8-
}
9+
}

0 commit comments

Comments
 (0)