mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Added cent (area) #8
This commit is contained in:
parent
0fa1ebe1cb
commit
aa1f5f8e9b
@ -564,13 +564,14 @@ class AllUnitsRepository @Inject constructor() {
|
|||||||
}
|
}
|
||||||
private val areaCollection: List<AbstractUnit> by lazy {
|
private val areaCollection: List<AbstractUnit> by lazy {
|
||||||
listOf(
|
listOf(
|
||||||
MyUnit(MyUnitIDS.acre, BigDecimal.valueOf(6.083246572E+31), UnitGroup.AREA, R.string.acre, R.string.acre_short ),
|
MyUnit(MyUnitIDS.cent, BigDecimal.valueOf(6.083246572E+33), UnitGroup.AREA, R.string.cent, R.string.cent_short),
|
||||||
|
MyUnit(MyUnitIDS.acre, BigDecimal.valueOf(6.083246572E+31), UnitGroup.AREA, R.string.acre, R.string.acre_short),
|
||||||
MyUnit(MyUnitIDS.hectare, BigDecimal.valueOf(1.503202964E+32), UnitGroup.AREA, R.string.hectare, R.string.hectare_short ),
|
MyUnit(MyUnitIDS.hectare, BigDecimal.valueOf(1.503202964E+32), UnitGroup.AREA, R.string.hectare, R.string.hectare_short ),
|
||||||
MyUnit(MyUnitIDS.square_foot, BigDecimal.valueOf(1.396521251E+27), UnitGroup.AREA, R.string.square_foot, R.string.square_foot_short),
|
MyUnit(MyUnitIDS.square_foot, BigDecimal.valueOf(1.396521251E+27), UnitGroup.AREA, R.string.square_foot, R.string.square_foot_short),
|
||||||
MyUnit(MyUnitIDS.square_mile, BigDecimal.valueOf(3.893277806E+34), UnitGroup.AREA, R.string.square_mile, R.string.square_mile_short),
|
MyUnit(MyUnitIDS.square_mile, BigDecimal.valueOf(3.893277806E+34), UnitGroup.AREA, R.string.square_mile, R.string.square_mile_short),
|
||||||
MyUnit(MyUnitIDS.square_yard, BigDecimal.valueOf(1.256869126E+28), UnitGroup.AREA, R.string.square_yard, R.string.square_yard_short),
|
MyUnit(MyUnitIDS.square_yard, BigDecimal.valueOf(1.256869126E+28), UnitGroup.AREA, R.string.square_yard, R.string.square_yard_short),
|
||||||
MyUnit(MyUnitIDS.square_inch, BigDecimal.valueOf(9.698064247E+24), UnitGroup.AREA, R.string.square_inch, R.string.square_inch_short),
|
MyUnit(MyUnitIDS.square_inch, BigDecimal.valueOf(9.698064247E+24), UnitGroup.AREA, R.string.square_inch, R.string.square_inch_short),
|
||||||
MyUnit(MyUnitIDS.square_micrometer, BigDecimal.valueOf(1.503202964E+16), UnitGroup.AREA, R.string.square_micrometer, R.string.square_micrometer_short),
|
MyUnit(MyUnitIDS.square_micrometer, BigDecimal.valueOf(1.503202964E+16), UnitGroup.AREA, R.string.square_micrometer, R.string.square_micrometer_short),
|
||||||
MyUnit(MyUnitIDS.square_millimeter, BigDecimal.valueOf(1.503202964E+22), UnitGroup.AREA, R.string.square_millimeter, R.string.square_millimeter_short),
|
MyUnit(MyUnitIDS.square_millimeter, BigDecimal.valueOf(1.503202964E+22), UnitGroup.AREA, R.string.square_millimeter, R.string.square_millimeter_short),
|
||||||
MyUnit(MyUnitIDS.square_centimeter, BigDecimal.valueOf(1.503202964E+24), UnitGroup.AREA, R.string.square_centimeter, R.string.square_centimeter_short),
|
MyUnit(MyUnitIDS.square_centimeter, BigDecimal.valueOf(1.503202964E+24), UnitGroup.AREA, R.string.square_centimeter, R.string.square_centimeter_short),
|
||||||
MyUnit(MyUnitIDS.square_decimeter, BigDecimal.valueOf(1.503202964E+26), UnitGroup.AREA, R.string.square_decimeter, R.string.square_decimeter_short),
|
MyUnit(MyUnitIDS.square_decimeter, BigDecimal.valueOf(1.503202964E+26), UnitGroup.AREA, R.string.square_decimeter, R.string.square_decimeter_short),
|
||||||
|
@ -165,6 +165,7 @@ object MyUnitIDS {
|
|||||||
|
|
||||||
// AREA
|
// AREA
|
||||||
const val electron_cross_section = "electron_cross_section"
|
const val electron_cross_section = "electron_cross_section"
|
||||||
|
const val cent = "cent"
|
||||||
const val acre = "acre"
|
const val acre = "acre"
|
||||||
const val hectare = "hectare"
|
const val hectare = "hectare"
|
||||||
const val square_foot = "square_foot"
|
const val square_foot = "square_foot"
|
||||||
|
@ -701,5 +701,7 @@
|
|||||||
<string name="gigaweber">Гигавебер</string>
|
<string name="gigaweber">Гигавебер</string>
|
||||||
<string name="gigaweber_short">ГВб</string>
|
<string name="gigaweber_short">ГВб</string>
|
||||||
<string name="flux">Поток</string>
|
<string name="flux">Поток</string>
|
||||||
|
<string name="cent">Цент</string>
|
||||||
|
<string name="cent_short">цент</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -324,6 +324,8 @@
|
|||||||
<!--Area-->
|
<!--Area-->
|
||||||
<string name="electron_cross_section">Electron cross section</string>
|
<string name="electron_cross_section">Electron cross section</string>
|
||||||
<string name="electron_cross_section_short">ecs</string>
|
<string name="electron_cross_section_short">ecs</string>
|
||||||
|
<string name="cent">Cent</string>
|
||||||
|
<string name="cent_short">cent</string>
|
||||||
<string name="acre">Acre</string>
|
<string name="acre">Acre</string>
|
||||||
<string name="acre_short">ac</string>
|
<string name="acre_short">ac</string>
|
||||||
<string name="hectare">Hectare</string>
|
<string name="hectare">Hectare</string>
|
||||||
|
@ -71,6 +71,7 @@ class AllUnitsTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testArea() {
|
fun testArea() {
|
||||||
|
MyUnitIDS.cent.checkWith(MyUnitIDS.acre, "75.9", "7590")
|
||||||
MyUnitIDS.acre.checkWith(MyUnitIDS.square_kilometer, "75.9", "0.30716")
|
MyUnitIDS.acre.checkWith(MyUnitIDS.square_kilometer, "75.9", "0.30716")
|
||||||
MyUnitIDS.hectare.checkWith(MyUnitIDS.square_foot, "75.9", "8169808.00585")
|
MyUnitIDS.hectare.checkWith(MyUnitIDS.square_foot, "75.9", "8169808.00585")
|
||||||
MyUnitIDS.square_foot.checkWith(MyUnitIDS.square_decimeter, "75.9", "705.13407")
|
MyUnitIDS.square_foot.checkWith(MyUnitIDS.square_decimeter, "75.9", "705.13407")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user