Constructor
new UnitOfArea()
Members
(static, constant) ARE :String
公亩。
Type:
- String
(static, constant) HECTARE :String
公顷。
Type:
- String
(static, constant) SQUARE_KILOMETER :String
平方千米/公里。
Type:
- String
(static, constant) SQUARE_METER :String
平方米。
Type:
- String
Methods
(static) smToARE(sm) → {Number}
平方米转公亩。
Parameters:
Name | Type | Description |
---|---|---|
sm |
Number | 平方米。 |
Returns:
公亩。
- Type
- Number
(static) smToHE(sm) → {Number}
平方米转公顷。
Parameters:
Name | Type | Description |
---|---|---|
sm |
Number | 平方米。 |
Returns:
公顷。
- Type
- Number
(static) smToSk(sm) → {Number}
平方米转平方千米。
Parameters:
Name | Type | Description |
---|---|---|
sm |
Number | 平方米。 |
Returns:
平方千米。
- Type
- Number
(static) spliceNumAndUnitString(num, unit, criticalValueopt, precisionValueopt) → {String}
拼接数值和单位为一个字符串。
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
num |
Number | 数值。 | ||
unit |
String | 单位。 | ||
criticalValue |
Number |
<optional> |
1000000.0
|
临界值,用于米和千米之间的自动转换。 |
precisionValue |
Number |
<optional> |
2
|
精度值,保留指定位数的小数。 |
Returns:
拼接好的字符串。
- Type
- String