Package com.thortech.xl.util.adapters
Class tcUtilMathOperations
java.lang.Object
com.thortech.xl.util.adapters.tcUtilMathOperations
This class has the basic math operations utility methods. Author: Louis
Cheng July 11, 2002
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatadd(float pnLeftVar, float pnRightVar) method that performs addition of two floats.static intadd(float pnLeftVar, int pnRightVar) method that performs addition of a float and integer.static floatadd(int pnLeftVar, float pnRightVar) method that performs addition of a float and integer.static intadd(int pnLeftVar, int pnRightVar) method that performs addition of two integers.static floatdivide(float pnLeftVar, float pnRightVar) method that performs division of two floats.static intdivide(float pnLeftVar, int pnRightVar) method that performs division of a float and integer.static floatdivide(int pnLeftVar, float pnRightVar) method that performs division of a float and integer.static intdivide(int pnLeftVar, int pnRightVar) method that performs division of two integers.static floatmodulus(float pnLeftVar, float pnRightVar) method that performs modulus of two floats.static intmodulus(float pnLeftVar, int pnRightVar) method that performs modulus of a float and integer.static floatmodulus(int pnLeftVar, float pnRightVar) method that performs modulus of a float and integer.static intmodulus(int pnLeftVar, int pnRightVar) method that performs modulus of two integers.static floatmultiply(float pnLeftVar, float pnRightVar) method that performs multiplication of two floats.static intmultiply(float pnLeftVar, int pnRightVar) method that performs multiplication of a float and integer.static floatmultiply(int pnLeftVar, float pnRightVar) method that performs multiplication of a float and integer.static intmultiply(int pnLeftVar, int pnRightVar) method that performs multiplication of two integers.static floatsubtract(float pnLeftVar, float pnRightVar) method that performs subtraction of two floats.static intsubtract(float pnLeftVar, int pnRightVar) method that performs subtraction of a float and integer.static floatsubtract(int pnLeftVar, float pnRightVar) method that performs subtraction of a float and integer.static intsubtract(int pnLeftVar, int pnRightVar) method that performs subtraction of two integers.
-
Constructor Details
-
tcUtilMathOperations
public tcUtilMathOperations()
-
-
Method Details
-
add
public static int add(int pnLeftVar, int pnRightVar) method that performs addition of two integers.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the addition
-
add
public static float add(float pnLeftVar, float pnRightVar) method that performs addition of two floats.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the addition
-
add
public static float add(int pnLeftVar, float pnRightVar) method that performs addition of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the addition
-
add
public static int add(float pnLeftVar, int pnRightVar) method that performs addition of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the addition
-
subtract
public static int subtract(int pnLeftVar, int pnRightVar) method that performs subtraction of two integers.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the subtraction
-
subtract
public static float subtract(float pnLeftVar, float pnRightVar) method that performs subtraction of two floats.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the subtraction
-
subtract
public static float subtract(int pnLeftVar, float pnRightVar) method that performs subtraction of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the subtraction
-
subtract
public static int subtract(float pnLeftVar, int pnRightVar) method that performs subtraction of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the subtraction
-
multiply
public static int multiply(int pnLeftVar, int pnRightVar) method that performs multiplication of two integers.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the multiplication
-
multiply
public static float multiply(float pnLeftVar, float pnRightVar) method that performs multiplication of two floats.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the multiplication
-
multiply
public static float multiply(int pnLeftVar, float pnRightVar) method that performs multiplication of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the multiplication
-
multiply
public static int multiply(float pnLeftVar, int pnRightVar) method that performs multiplication of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the multiplication
-
divide
public static int divide(int pnLeftVar, int pnRightVar) method that performs division of two integers.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the division
-
divide
public static float divide(float pnLeftVar, float pnRightVar) method that performs division of two floats.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the division
-
divide
public static float divide(int pnLeftVar, float pnRightVar) method that performs division of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the division
-
divide
public static int divide(float pnLeftVar, int pnRightVar) method that performs division of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the division
-
modulus
public static int modulus(int pnLeftVar, int pnRightVar) method that performs modulus of two integers.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the modulus operation
-
modulus
public static float modulus(float pnLeftVar, float pnRightVar) method that performs modulus of two floats.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the modulus operation
-
modulus
public static float modulus(int pnLeftVar, float pnRightVar) method that performs modulus of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the modulus operation
-
modulus
public static int modulus(float pnLeftVar, int pnRightVar) method that performs modulus of a float and integer.- Parameters:
pnLeftVar- left side of the expressionpnRightVar- right side of the expression- Returns:
- the result of the modulus operation
-