Class SDCAbstractRounding
java.lang.Object
net.finmath.smartcontract.valuation.service.utils.SDCAbstractRounding
- Direct Known Subclasses:
SDCRounding
The Class SDCAbstractRounding
Contains general rounding methods, as well as converting to strings.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the double from the left shifted integer StringgetRoundedValueAsIntegerString
(double variable) Returns an integer value, the double left shifteddouble
roundDouble
(double variable) Round double.
-
Field Details
-
scale
protected int scale -
roundingMode
-
-
Constructor Details
-
SDCAbstractRounding
public SDCAbstractRounding()
-
-
Method Details
-
roundDouble
public double roundDouble(double variable) Round double.- Parameters:
variable
- the double var- Returns:
- the rounded double
-
getRoundedValueAsIntegerString
Returns an integer value, the double left shifted- Parameters:
variable
- the double var- Returns:
- the double as integer string
-
getDoubleFromIntegerString
Gets the double from the left shifted integer String- Parameters:
s
- the integer string- Returns:
- the double
-