Skip to content

Commit

Permalink
Fix FTr and 3PAr team stat formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Jan 15, 2025
1 parent a5983a3 commit ff9cfec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
on drive chart, a 2 point conversion attempt that goes backwards puts the end of the score tag on the wrong side of the field

3PAr and FT/FGA look wrong on league stats page?

trading block picks filter should also include negative value players if that allows another pick or a better pick to be included

persistent no trade button
Expand Down
10 changes: 6 additions & 4 deletions src/worker/core/team/processStats.basketball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ const processStats = (
row.poss = poss(ts);
scale = false;
} else if (stat === "tpar") {
row[stat] = helpers.percentage(ts.tpa, ts.fga);
row[stat] = helpers.percentage(ts.tpa, ts.fga) / 100;
scale = false;
} else if (stat === "ftr") {
row[stat] = helpers.percentage(ts.fta, ts.fga);
row[stat] = helpers.percentage(ts.fta, ts.fga) / 100;
scale = false;
} else if (stat === "tsp") {
row[stat] = helpers.percentage(ts.pts, 2 * (ts.fga + 0.44 * ts.fta));
Expand All @@ -157,7 +157,7 @@ const processStats = (
row[stat] = helpers.percentage(ts.orb, ts.orb + ts.oppDrb);
scale = false;
} else if (stat === "ftpFga") {
row[stat] = ts.ft / ts.fga;
row[stat] = helpers.percentage(ts.ft, ts.fga) / 100;
scale = false;
} else if (
stat === "season" ||
Expand Down Expand Up @@ -194,8 +194,10 @@ const processStats = (
const val = row[stat] ?? ts[stat];
if (statType === "totals") {
row[stat] = val;
} else {
} else if (ts.gp > 0) {
row[stat] = val / ts.gp;
} else {
row[stat] = 0;
}
}
}
Expand Down

0 comments on commit ff9cfec

Please sign in to comment.