PenProfile 2.x

com.livescribe.util
Class MathFunctions

java.lang.Object
  extended by com.livescribe.util.MathFunctions

public final class MathFunctions
extends Object

MathFunctions provide rounding and scientific methods


Method Summary
static double acos(double cosValue)
          Returns the arc cosine of an angle
static double asin(double sinValue)
          Returns the arc sine of an angle
static double atan(double tanValue)
          Returns the arc tangent of an angle
static float exp(float value)
          Returns Euler's number, e, raised to the specified value.
static double ln(double lnValue)
          Returns the natural logarithm (base e) of a double value.
static double log(double logValue)
          Returns the base 10 logarithm of a double value.
static double pow(double base, double power)
          Returns the value of the first argument raised to the power of the second argument
static float powf(float base, float power)
          Returns the value of the first argument raised to the power of the second argument
static String powString(float base, float power)
          Returns the value of the first argument raised to the power of the second argument as a String
static double round(double value)
          Rounds the specified value.
static String roundDisplay(double value)
          Returns the value of a decimal value with rounding
static float roundf(float value)
          Rounds the specified value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ln

public static double ln(double lnValue)
Returns the natural logarithm (base e) of a double value. Note that the name of this method differs from Java's standard Math.log().

Parameters:
lnValue - a value
Returns:
the value ln lnValue, the natural logarithm of lnValue.

log

public static double log(double logValue)
Returns the base 10 logarithm of a double value. Note that the name of this method differs from Java's standard Math.log10().

Parameters:
logValue - a value
Returns:
the base 10 logarithm of logValue

pow

public static double pow(double base,
                         double power)
Returns the value of the first argument raised to the power of the second argument

Parameters:
base - the base
power - the exponent
Returns:
the result of raising the base to the exponent

powString

public static String powString(float base,
                               float power)
Returns the value of the first argument raised to the power of the second argument as a String

Parameters:
base - the base
power - the exponent
Returns:
the result of raising the base to the exponent as a String value

roundDisplay

public static String roundDisplay(double value)
Returns the value of a decimal value with rounding

Parameters:
value - The value that needs to be rounded. It should be in format [number.decimal] If the decimal value is greater then 10 digits then the decimal value is rounded to the 10th decimal place
Returns:
the result rounded to the 10th decimal place

powf

public static float powf(float base,
                         float power)
Returns the value of the first argument raised to the power of the second argument

Parameters:
base - the base
power - the exponent
Returns:
the result of raising the base to the exponent

exp

public static float exp(float value)
Returns Euler's number, e, raised to the specified value.

Parameters:
value - the exponent
Returns:
the value after raising e, where e is the base of the natural logarithm

round

public static double round(double value)
Rounds the specified value.

Parameters:
value - round this value
Returns:
the rounded value.

roundf

public static float roundf(float value)
Rounds the specified value.

Parameters:
value - round this value
Returns:
the rounded float value.

acos

public static double acos(double cosValue)
Returns the arc cosine of an angle

Parameters:
cosValue - the value whose arc cosine is to be returned
Returns:
the arc cosine of the argument

asin

public static double asin(double sinValue)
Returns the arc sine of an angle

Parameters:
sinValue - the value whose arc sine is to be returned
Returns:
the arc sine of the argument

atan

public static double atan(double tanValue)
Returns the arc tangent of an angle

Parameters:
tanValue - the value whose arc tangent is to be returned
Returns:
the arc tangent of the argument

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.