Skip to content

Commit 9880614

Browse files
committed
Reduce precision of abscissas in curves.js
Shortened the decimal precision of abscissas values in Curve object for improved readability and maintainability. Updated .gitignore to exclude codacy instructions for VSCode AI rules.
1 parent ac83620 commit 9880614

File tree

2 files changed

+26
-45
lines changed

2 files changed

+26
-45
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ junk/
55
docs.json
66
dist
77
.idea
8-
.codacy
8+
.codacy
9+
10+
#Ignore vscode AI rules
11+
.github/instructions/codacy.instructions.md

src/utils/curves.js

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,63 +26,41 @@ const Curve = {
2626
// As values are symmetric, only store half of them and adapt algorithm
2727
// to factor in symmetry.
2828
abscissas: [
29-
[0.5773502691896257645091488],
30-
[0, 0.7745966692414833770358531],
31-
[0.3399810435848562648026658, 0.8611363115940525752239465],
32-
[0, 0.5384693101056830910363144, 0.9061798459386639927976269],
29+
[0.5773502691896],
30+
[0, 0.7745966692415],
31+
[0.3399810435849, 0.8611363115941],
32+
[0, 0.5384693101057, 0.9061798459387],
33+
[0.2386191860832, 0.6612093864663, 0.9324695142032],
34+
[0, 0.4058451513774, 0.7415311855994, 0.9491079123428],
35+
[0.1834346424956, 0.5255324099163, 0.7966664774136, 0.9602898564975],
36+
[0, 0.3242534234038, 0.6133714327006, 0.8360311073266, 0.9681602395076],
3337
[
34-
0.2386191860831969086305017, 0.6612093864662645136613996,
35-
0.9324695142031520278123016,
38+
0.1488743389816, 0.4333953941292, 0.679409568299, 0.865063366689,
39+
0.9739065285172,
3640
],
3741
[
38-
0, 0.4058451513773971669066064, 0.7415311855993944398638648,
39-
0.9491079123427585245261897,
42+
0, 0.2695431559523, 0.5190961292068, 0.730152005574, 0.8870625997681,
43+
0.9782286581461,
4044
],
4145
[
42-
0.1834346424956498049394761, 0.525532409916328985817739,
43-
0.7966664774136267395915539, 0.9602898564975362316835609,
46+
0.1252334085115, 0.3678314989982, 0.5873179542866, 0.7699026741943,
47+
0.9041172563705, 0.9815606342467,
4448
],
4549
[
46-
0, 0.324253423403808929038538, 0.613371432700590397308702,
47-
0.8360311073266357942994298, 0.9681602395076260898355762,
50+
0, 0.2304583159551, 0.4484927510364, 0.6423493394403, 0.8015780907333,
51+
0.917598399223, 0.9841830547186,
4852
],
4953
[
50-
0.148874338981631210884826, 0.4333953941292471907992659,
51-
0.6794095682990244062343274, 0.8650633666889845107320967,
52-
0.973906528517171720077964,
54+
0.1080549487073, 0.3191123689279, 0.5152486363582, 0.6872929048117,
55+
0.8272013150698, 0.9284348836636, 0.9862838086968,
5356
],
5457
[
55-
0, 0.269543155952344972331532, 0.5190961292068118159257257,
56-
0.7301520055740493240934163, 0.8870625997680952990751578,
57-
0.978228658146056992803938,
58+
0, 0.2011940939974, 0.3941513470776, 0.5709721726085, 0.7244177313602,
59+
0.8482065834104, 0.9372733924007, 0.9879925180205,
5860
],
5961
[
60-
0.1252334085114689154724414, 0.3678314989981801937526915,
61-
0.5873179542866174472967024, 0.7699026741943046870368938,
62-
0.9041172563704748566784659, 0.9815606342467192506905491,
63-
],
64-
[
65-
0, 0.2304583159551347940655281, 0.4484927510364468528779129,
66-
0.6423493394403402206439846, 0.8015780907333099127942065,
67-
0.9175983992229779652065478, 0.9841830547185881494728294,
68-
],
69-
[
70-
0.1080549487073436620662447, 0.3191123689278897604356718,
71-
0.5152486363581540919652907, 0.6872929048116854701480198,
72-
0.8272013150697649931897947, 0.9284348836635735173363911,
73-
0.9862838086968123388415973,
74-
],
75-
[
76-
0, 0.2011940939974345223006283, 0.3941513470775633698972074,
77-
0.5709721726085388475372267, 0.7244177313601700474161861,
78-
0.8482065834104272162006483, 0.9372733924007059043077589,
79-
0.9879925180204854284895657,
80-
],
81-
[
82-
0.0950125098376374401853193, 0.2816035507792589132304605,
83-
0.4580167776572273863424194, 0.6178762444026437484466718,
84-
0.7554044083550030338951012, 0.8656312023878317438804679,
85-
0.9445750230732325760779884, 0.9894009349916499325961542,
62+
0.0950125098376, 0.2816035507793, 0.4580167776572, 0.6178762444026,
63+
0.755404408355, 0.8656312023878, 0.9445750230732, 0.9894009349916,
8664
],
8765
],
8866

0 commit comments

Comments
 (0)