Add more info to the pets page

This commit is contained in:
nea
2023-06-11 04:00:29 +02:00
parent db8e3640e8
commit 99fcad8360
5 changed files with 95 additions and 25 deletions

View File

@@ -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