From d43405f3e1310f792bd4bae5e69cab7042734527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Tue, 21 Jan 2020 10:35:07 +0100 Subject: [PATCH] Percentages are hard --- src/ui/TotalBought.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/TotalBought.vue b/src/ui/TotalBought.vue index 4e03fa5..ad69fc8 100644 --- a/src/ui/TotalBought.vue +++ b/src/ui/TotalBought.vue @@ -66,16 +66,16 @@ export default { this.red.win + this.yellow.win + this.blue.win + this.green.win; this.redPercentage = this.round( - this.red.win == 0 ? 0 : (this.totalWin / this.red.win) * 100 + this.red.win == 0 ? 0 : (this.red.win / this.totalWin) * 100 ); this.greenPercentage = this.round( - this.green.win == 0 ? 0 : (this.totalWin / this.green.win) * 100 + this.green.win == 0 ? 0 : (this.green.win / this.totalWin) * 100 ); this.bluePercentage = this.round( - this.blue.win == 0 ? 0 : (this.totalWin / this.blue.win) * 100 + this.blue.win == 0 ? 0 : (this.blue.win / this.totalWin) * 100 ); this.yellowPercentage = this.round( - this.yellow.win == 0 ? 0 : (this.totalWin / this.yellow.win) * 100 + this.yellow.win == 0 ? 0 : (this.yellow.win / this.totalWin) * 100 ); }, methods: {