From 25bd44ae68b8adffc41a83313d47e76272914de2 Mon Sep 17 00:00:00 2001
From: mweggen <361046+mweggen@users.noreply.github.com>
Date: Mon, 25 Feb 2019 21:27:23 +0100
Subject: [PATCH] Move JSDOC to proper spot, remove unnecessary parentheses

---
 src/js/summaryWidgets.js | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/js/summaryWidgets.js b/src/js/summaryWidgets.js
index 6af4e66e07c..215c5b2488b 100644
--- a/src/js/summaryWidgets.js
+++ b/src/js/summaryWidgets.js
@@ -1,14 +1,17 @@
-window.SlaveStatClamp = /** @param {App.Entity.SlaveState} slave */ function SlaveStatClamp(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.SlaveStatClamp = function SlaveStatClamp(slave) {
 	slave.energy = Math.clamp(slave.energy, 0, 100);
 	const V = State.variables;
 
 	if (slave.devotion > 100) {
 		if (slave.trust < -95)
 			slave.trust = -100;
-		else if ((slave.trust < 100) && (slave.trust > 20))
-			slave.trust += (Math.trunc((slave.devotion-100)*5)/10);
+		else if (slave.trust < 100 && slave.trust > 20)
+			slave.trust += Math.trunc((slave.devotion - 100) * 5) / 10;
 		else
-			repX(4*(slave.devotion-100), "slavesViewOfPC", slave);
+			repX(4 * (slave.devotion - 100), "slavesViewOfPC", slave);
 		slave.devotion = 100;
 	} else if (slave.devotion < -95)
 		slave.devotion = -100;
@@ -16,9 +19,9 @@ window.SlaveStatClamp = /** @param {App.Entity.SlaveState} slave */ function Sla
 		if (slave.devotion < -95)
 			slave.devotion = -100;
 		else if (slave.devotion < 100 && slave.devotion > 20)
-			slave.devotion += Math.trunc(slave.trust-100);
+			slave.devotion += Math.trunc(slave.trust - 100);
 		else
-			repX(4*(slave.trust-100), "slavesViewOfPC", slave);
+			repX(4 * (slave.trust - 100), "slavesViewOfPC", slave);
 		slave.trust = 100;
 	} else if (slave.trust < -95)
 		slave.trust = -100;
-- 
GitLab