package com.zy.asrs.utils; import com.core.common.Arith; import java.math.BigDecimal; import java.text.DecimalFormat; /** * Created by vincent on 2020/8/27 */ public class Utils { private static final DecimalFormat fmt = new DecimalFormat("##0.00"); public static float scale(Float f){ if (f == null || f == 0f || Float.isNaN(f)) { return 0f; } return (float) Arith.multiplys(2, f, 1); } }