com.stimulsoft.base.utils
Class StiMath

java.lang.Object
  extended by com.stimulsoft.base.utils.StiMath

public class StiMath
extends java.lang.Object

StiMath helper to operate with Mathmatic commands Copyright Stimulsoft


Method Summary
static double inscribe(double value, double min, double max)
          Inscribe value to min/max values
static double round(java.lang.Double value, java.lang.Double digits)
          Round value to digits after point
static double round(double value, int digits)
          Round value to digits after point
static double round(float value, int digits)
          Round value to digits after point
static int roundDown(java.lang.Double value)
          Round to down value
static java.lang.String roundS(double value, int digits)
           
static int roundUp(java.lang.Double value)
          Round to upper value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

round

public static double round(java.lang.Double value,
                           java.lang.Double digits)
Round value to digits after point

Parameters:
value -
digits -
Returns:

round

public static double round(double value,
                           int digits)
Round value to digits after point

Parameters:
value -
digits -
Returns:

roundS

public static java.lang.String roundS(double value,
                                      int digits)

round

public static double round(float value,
                           int digits)
Round value to digits after point

Parameters:
value -
digits -
Returns:

roundUp

public static int roundUp(java.lang.Double value)
Round to upper value

Parameters:
value -
Returns:

roundDown

public static int roundDown(java.lang.Double value)
Round to down value

Parameters:
value -
Returns:

inscribe

public static double inscribe(double value,
                              double min,
                              double max)
Inscribe value to min/max values

Parameters:
value -
min -
max -
Returns: