Java BigDecimal getPercentageValue(BigDecimal price, double amount)

Here you can find the source of getPercentageValue(BigDecimal price, double amount)

Description

get Percentage Value

License

Apache License

Declaration

private static BigDecimal getPercentageValue(BigDecimal price, double amount) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    private static BigDecimal getPercentageValue(BigDecimal price, double amount) {
        return price.multiply(new BigDecimal(amount / 100));
    }// w w w . jav  a 2s  .  com
}

Related

  1. getNumberAsBigDecimal(Number value)
  2. getNumberOfDecimalPlaces(BigDecimal bigDecimal)
  3. getParamBigDecimal(Map paramMap, String paramName)
  4. getPercent(BigDecimal numerator, BigDecimal denominator)
  5. getPercentage(BigDecimal amount, BigDecimal percent)
  6. getProfit(BigDecimal ask, BigDecimal bid, BigDecimal fee)
  7. getProzentWert(BigDecimal zahl, BigDecimal prozentsatz, int nachkommastellen)
  8. getRandomBigDecimal(BigDecimal a, BigDecimal b)
  9. getRandomBigDecimal(int maxValue, int scale)