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 kgToLBoz(float paramFloat) {
        float f1 = (32768.0F + 23117.0F * paramFloat) / 65536.0F;
        int i = (int) (f1 * 0.1F) / 16;
        float f2 = f1 * 0.1F % 16.0F;
        DecimalFormat localDecimalFormat = new DecimalFormat();
        localDecimalFormat.setMaximumFractionDigits(1);
        localDecimalFormat.setGroupingSize(0);
        localDecimalFormat.setRoundingMode(RoundingMode.FLOOR);
        return i + ":" + localDecimalFormat.format(f2);
    }
}