Bruce.Deng
5 years ago
5 changed files with 109 additions and 12 deletions
@ -0,0 +1,38 @@
|
||||
package com.fanruan.api.report; |
||||
|
||||
import com.fr.stable.unit.UNIT; |
||||
import com.fr.stable.unit.UnitUtils; |
||||
|
||||
public class UnitKit { |
||||
|
||||
/** |
||||
* 数值转化成英尺单位 |
||||
* |
||||
* @param doubleString |
||||
* @return 转化后的单位 |
||||
*/ |
||||
public static UNIT unit4CompatibleInchDV(String doubleString) { |
||||
return UnitUtils.unit4CompatibleInchDV(doubleString); |
||||
} |
||||
|
||||
/** |
||||
* 数值转化成毫米单位 |
||||
* |
||||
* @param doubleString |
||||
* @return 转化后的单位 |
||||
*/ |
||||
public static UNIT unit4CompatibleMMDV(String doubleString) { |
||||
return UnitUtils.unit4CompatibleMMDV(doubleString); |
||||
} |
||||
|
||||
/** |
||||
* 两个单位相减取绝对值 |
||||
* |
||||
* @param a 单位a |
||||
* @param b 单位b |
||||
* @return 两个单位差值的绝对值 |
||||
*/ |
||||
public static UNIT abs(UNIT a, UNIT b) { |
||||
return UnitUtils.abs(a, b); |
||||
} |
||||
} |
Loading…
Reference in new issue