Round a value to one of the possible values in the specified list


Namespace: PalmSens.Plot
Assembly: PalmSens.Plot (in PalmSens.Plot.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function SmartRound( _ 
   ByVal possible As Double(),  _ 
   ByVal fl As Double,  _ 
   ByVal ceil As Boolean _ 
) As Double
C#
public static double SmartRound(
   double[] possible,
   double fl,
   bool ceil
)
C++
public:
 static double SmartRound(
   array<double>^ possible,
   double fl,
   bool ceil
)
J#
public static double SmartRound(
   double[] possible,
   double fl,
   bool ceil
)
JScript
public static  function SmartRound(
   possible : double[],
   fl : double,
   ceil : bool
) : double

Parameters

possible
List of possible (float) values. In ascending order.
fl
Float to round.
ceil
Whether to ceil or floor (true for ceiling, false for floor)

Return Value

Rounded float

See Also