From 1c06fe00b9e9ec71d0cb41dd08ce4a9193a66fa2 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Thu, 29 Aug 2019 16:38:51 +0100 Subject: [PATCH] Fixed score rounding for CSV output --- .../main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt index b7fbf1a..60ece5e 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt @@ -18,7 +18,7 @@ import javax.persistence.ManyToOne import javax.persistence.OneToMany import javax.persistence.OneToOne import javax.persistence.Table -import kotlin.math.round +import kotlin.math.roundToInt /** * Defines a location at which observations occur. @@ -120,7 +120,7 @@ data class Observation( private fun roundScore(input: Double?): String { if (input != null) { - return round(input).toString() + return input.roundToInt().toString() } return "" }