Here you can find the source of floor(double value, int scale)
Parameter | Description |
---|---|
value | the value |
scale | the scale |
public static double floor(double value, int scale)
//package com.java2s; //License from project: Apache License public class Main { /**/* w w w . j av a 2 s. c om*/ * Floor. * * @param value * the value * @param scale * the scale * @return the double */ public static double floor(double value, int scale) { double power = Math.pow(10, scale); return Math.floor(value * power) / power; } }