aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/utils/utils.scala
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-27 17:19:46 +0200
committerJoel Kronqvist <joel.kronqvist@iki.fi>2024-11-27 17:19:46 +0200
commit302455bac062080bf197b44e07ed53a3454be4c5 (patch)
tree8b189ba41699c9a095d27bf00d1114a65aaa420a /src/scalevalapokalypsi/utils/utils.scala
parent98407b35ff477f372baa92bf582b90a961d4ad16 (diff)
downloadscalevalapokalypsi-302455bac062080bf197b44e07ed53a3454be4c5.tar.gz
scalevalapokalypsi-302455bac062080bf197b44e07ed53a3454be4c5.zip
Finishing almost the adventure
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.