Always use US locale when logging rounded numbers.

This commit is contained in:
Greyson Parrelli 2024-02-21 13:08:43 -05:00
parent 8fc9893ecd
commit 755fafb0b6

View file

@ -5,6 +5,8 @@
package org.signal.core.util
import java.util.Locale
/**
* Rounds a number to the specified number of places. e.g.
*
@ -12,5 +14,5 @@ package org.signal.core.util
* 1.123456f.roundedString(5) = 1.12346
*/
fun Double.roundedString(places: Int): String {
return String.format("%.${places}f", this)
return String.format(Locale.US, "%.${places}f", this)
}