Add decimeter as unit of length

Close #650
This commit is contained in:
MM20
2024-01-19 22:54:03 +01:00
parent 3de61e544b
commit f8f82e6294
3 changed files with 11 additions and 1 deletions
@@ -18,6 +18,11 @@ class LengthConverter(context: Context) : SimpleFactorConverter() {
context.getString(R.string.unit_kilometer_symbol),
R.plurals.unit_kilometer
),
MeasureUnitWithFactor(
10.0,
context.getString(R.string.unit_decimeter_symbol),
R.plurals.unit_decimeter
),
MeasureUnitWithFactor(
100.0,
context.getString(R.string.unit_centimeter_symbol),
@@ -7,7 +7,7 @@ import de.mm20.launcher2.unitconverter.MeasureUnit
import de.mm20.launcher2.unitconverter.UnitValue
/**
* A converter for units that can converted into each other by simply multiplicating with a constant factor
* A converter for units that can converted into each other by simple multiplication with a constant factor
*/
abstract class SimpleFactorConverter: Converter {
open val standardUnits: List<MeasureUnitWithFactor> = emptyList()