org.formulacompiler.runtime
Class ScaledLongSupport

java.lang.Object
  extended by org.formulacompiler.runtime.ScaledLongSupport

public final class ScaledLongSupport
extends java.lang.Object

Support class for handling scaled longs.

See the tutorial for details.

Author:
peo
See Also:
ScaledLong

Field Summary
static long[] ONE
          The number 1 for the scaled long type at the different supported scales.
 
Method Summary
static long scale(long _unscaled, int _scale)
          Returns a scaled version of an unscaled long value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE

public static final long[] ONE
The number 1 for the scaled long type at the different supported scales. Use it to scale unscaled values by multiplying them with the appropriate ONE.

See Also:
scale(long, int)
Method Detail

scale

public static long scale(long _unscaled,
                         int _scale)
Returns a scaled version of an unscaled long value.

Parameters:
_unscaled - is the unscaled value.
_scale - is the desired number of decimal places to scale by.
Returns:
the scaled number.