Soncresity Industries Wiki

Decimal Utilities

Allows rounding decimal values to a set number of decimal points

Introduction

A fully functional Version of this class has first been introduced in Version 2.1.0

The Decimal Utilities class allows you to round a decimal value to a set number of decimal points / places after the comma.

Class

File: DecimalUtils.java

Package: dev.soncresityindustries.es.api.v0.util

Methods

roundWithBigDecimal

public static double roundWithBigDecimal(double value, int places) {}

Usage

float rounded = DecimalUtils.roundWithBigDecimal(value, places);

On this page