aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt b/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
index 73ef121..ba77b04 100644
--- a/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/FirmFormatters.kt
@@ -4,6 +4,7 @@ import com.google.common.math.IntMath.pow
import kotlin.math.absoluteValue
object FirmFormatters {
+ fun toString(float: Float, fractionalDigits: Int): String = toString(float.toDouble(), fractionalDigits)
fun toString(double: Double, fractionalDigits: Int): String {
val long = double.toLong()
val δ = (double - long).absoluteValue