Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.math.RoundingMode;
import java.text.DecimalFormat;

public class Main {
    public static String kgToLB_ForBodyScale(float paramFloat) {
        int i = (int) Math.floor(1.0F + (32768.0F + 144479.0F * (paramFloat * 10.0F)) / 65536.0F);
        if (i % 2 != 0) {
            i--;
        }
        DecimalFormat localDecimalFormat = new DecimalFormat();
        localDecimalFormat.setMaximumFractionDigits(1);
        localDecimalFormat.setGroupingSize(0);
        localDecimalFormat.setRoundingMode(RoundingMode.FLOOR);
        return localDecimalFormat.format(0.1D * i);
    }
}