aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/utils/utils.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/scalevalapokalypsi/utils/utils.scala')
-rw-r--r--src/scalevalapokalypsi/utils/utils.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scalevalapokalypsi/utils/utils.scala b/src/scalevalapokalypsi/utils/utils.scala
index 4be0687..8179585 100644
--- a/src/scalevalapokalypsi/utils/utils.scala
+++ b/src/scalevalapokalypsi/utils/utils.scala
@@ -28,7 +28,7 @@ def byteArrayToString(bytes: Array[Byte]): Option[String] =
/** Incredibly LÖRS string metric algorithm.
* LÖRSiness explained by there being 6 hours left to the DL
*/
-def hammingDistance(s1: String, s2: String): Float =
+def hammingDistance(s1: String, s2: String): Int =
s1.zip(s2).map(p => p(0) != p(1)).filter((b: Boolean) => b).length
/** Reads n characters from the given InputStream blockingly.