|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.core.CMath
public class CMath
| Method Summary | |
|---|---|
double |
abs(double d)
|
float |
abs(float d)
|
static int |
abs(int val)
|
static long |
abs(long val)
|
static long |
absDiff(long x,
long y)
|
static boolean |
banyset(int num,
int bitmask)
|
static boolean |
banyset(long num,
int bitmask)
|
static boolean |
banyset(long num,
long bitmask)
|
static boolean |
bset(int num,
int bitmask)
|
static boolean |
bset(long num,
int bitmask)
|
static boolean |
bset(long num,
long bitmask)
|
static boolean |
bset(short num,
short bitmask)
|
double |
ceiling(double d)
|
float |
ceiling(float d)
|
static int |
convertFromRoman(java.lang.String s)
Convert an integer to its Roman Numeral equivalent Usage: Return=MiscFunc.convertToRoman(Number)+"."; |
static java.lang.String |
convertToRoman(int i)
Convert an integer to its Roman Numeral equivalent Usage: Return=MiscFunc.convertToRoman(Number)+"."; |
static double |
div(double a,
double b)
|
static double |
div(double a,
int b)
|
static double |
div(double a,
long b)
|
static double |
div(int a,
double b)
|
static double |
div(int a,
int b)
|
static double |
div(long a,
double b)
|
static double |
div(long a,
long b)
|
double |
floor(double d)
|
float |
floor(float d)
|
static CMath |
instance()
|
static boolean |
isBool(java.lang.String BOOL)
Returns whether the given string is a boolean value Usage: if(isBool(CMD.substring(14))); |
static boolean |
isDouble(java.lang.String DBL)
Returns whether the given string is a double value Usage: if(isDouble(CMD.substring(14))); |
static boolean |
isFloat(java.lang.String DBL)
Returns whether the given string is a float value Usage: if(isFloat(CMD.substring(14))); |
static boolean |
isInteger(java.lang.String INT)
Returns whether the given string is a int value Usage: if(isInteger(CMD.substring(14))); |
static boolean |
isLong(java.lang.String LONG)
Returns whether the given string is a long value Usage: if(isLong(CMD.substring(14))); |
static boolean |
isMathExpression(java.lang.String st)
|
static boolean |
isMathExpression(java.lang.String st,
double[] vars)
|
static boolean |
isNumber(java.lang.String s)
|
static boolean |
isPct(java.lang.String s)
|
static boolean |
isRomanDigit(char c)
|
static boolean |
isRomanNumeral(java.lang.String s)
|
static boolean |
isSet(int number,
int bitnumber)
|
static boolean |
isSet(long number,
int bitnumber)
|
static double |
mul(double a,
double b)
|
static double |
mul(double a,
int b)
|
static double |
mul(double a,
long b)
|
static double |
mul(int a,
double b)
|
static int |
mul(int a,
int b)
|
static double |
mul(long a,
double b)
|
static long |
mul(long a,
long b)
|
static java.lang.String |
numAppendage(int num)
|
static int |
parseIntExpression(java.lang.String formula)
|
static int |
parseIntExpression(java.lang.String formula,
double[] vars)
|
static long |
parseLongExpression(java.lang.String formula)
|
static long |
parseLongExpression(java.lang.String formula,
double[] vars)
|
static double |
parseMathExpression(java.lang.String formula)
|
static double |
parseMathExpression(java.lang.String formula,
double[] vars)
|
static long |
pow(long x,
long y)
|
double |
random()
|
long |
round(double d)
|
long |
round(float d)
|
static boolean |
s_bool(java.lang.String BOOL)
Returns the boolean value of a string without crashing Usage: int num=s_bool(CMD.substring(14)); |
static double |
s_double(java.lang.String DOUBLE)
Returns the double value of a string without crashing Usage: dSize = WebIQBase.s_double(WebIQBase.getRes(AttStatsRes,"BlobSize")); |
static float |
s_float(java.lang.String FLOAT)
Returns the floating point value of a string without crashing Usage: lSize = WebIQBase.s_float(WebIQBase.getRes(AttStatsRes,"BlobSize")); |
static int |
s_int(java.lang.String INT)
Returns the integer value of a string without crashing Usage: int num=s_int(CMD.substring(14)); |
static long |
s_long(java.lang.String LONG)
Returns the long value of a string without crashing Usage: lSize = WebIQBase.s_long(WebIQBase.getRes(AttStatsRes,"BlobSize")); |
static int |
s_parseIntExpression(java.lang.String st)
|
static int |
s_parseIntExpression(java.lang.String st,
double[] vars)
|
static long |
s_parseLongExpression(java.lang.String st)
|
static long |
s_parseLongExpression(java.lang.String st,
double[] vars)
|
static double |
s_parseMathExpression(java.lang.String st)
|
static double |
s_parseMathExpression(java.lang.String st,
double[] vars)
|
static double |
s_pct(java.lang.String s)
|
static short |
s_short(java.lang.String SHORT)
Returns the short value of a string without crashing Usage: int num=s_short(CMD.substring(14)); |
static int |
setb(int num,
int bitmask)
|
static long |
setb(long num,
int bitmask)
|
static long |
setb(long num,
long bitmask)
|
double |
sqrt(double d)
|
float |
sqrt(float d)
|
static int |
squared(int x)
|
static java.lang.String |
toPct(double d)
|
static java.lang.String |
toPct(java.lang.String s)
|
static int |
unsetb(int num,
int bitmask)
|
static long |
unsetb(long num,
int bitmask)
|
static long |
unsetb(long num,
long bitmask)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CMath instance()
public static java.lang.String convertToRoman(int i)
i - Integer to convert
public static int convertFromRoman(java.lang.String s)
s - String to convert
public static java.lang.String numAppendage(int num)
public static boolean isRomanDigit(char c)
public static boolean isRomanNumeral(java.lang.String s)
public static long absDiff(long x,
long y)
public static boolean isNumber(java.lang.String s)
public static double div(double a,
double b)
public static double div(double a,
int b)
public static double div(int a,
double b)
public static double div(double a,
long b)
public static double div(long a,
double b)
public static double mul(double a,
double b)
public static double mul(double a,
int b)
public static double mul(int a,
double b)
public static double mul(double a,
long b)
public static double mul(long a,
double b)
public static long mul(long a,
long b)
public static int mul(int a,
int b)
public static double div(long a,
long b)
public static double div(int a,
int b)
public static long pow(long x,
long y)
public static int squared(int x)
public static boolean bset(short num,
short bitmask)
public static boolean bset(int num,
int bitmask)
public static boolean bset(long num,
long bitmask)
public static boolean bset(long num,
int bitmask)
public static int setb(int num,
int bitmask)
public static boolean banyset(int num,
int bitmask)
public static boolean banyset(long num,
long bitmask)
public static boolean banyset(long num,
int bitmask)
public static long setb(long num,
int bitmask)
public static long setb(long num,
long bitmask)
public static int unsetb(int num,
int bitmask)
public static long unsetb(long num,
long bitmask)
public static long unsetb(long num,
int bitmask)
public static boolean isSet(int number,
int bitnumber)
public static boolean isPct(java.lang.String s)
public static double s_pct(java.lang.String s)
public static java.lang.String toPct(double d)
public static java.lang.String toPct(java.lang.String s)
public static boolean isSet(long number,
int bitnumber)
public static boolean isMathExpression(java.lang.String st)
public static boolean isMathExpression(java.lang.String st,
double[] vars)
public static double s_parseMathExpression(java.lang.String st)
public static double s_parseMathExpression(java.lang.String st,
double[] vars)
public static long s_parseLongExpression(java.lang.String st)
public static long s_parseLongExpression(java.lang.String st,
double[] vars)
public static int s_parseIntExpression(java.lang.String st)
public static int s_parseIntExpression(java.lang.String st,
double[] vars)
public static long parseLongExpression(java.lang.String formula)
public static long parseLongExpression(java.lang.String formula,
double[] vars)
public static int parseIntExpression(java.lang.String formula)
throws java.lang.ArithmeticException
java.lang.ArithmeticException
public static int parseIntExpression(java.lang.String formula,
double[] vars)
throws java.lang.ArithmeticException
java.lang.ArithmeticException
public static double parseMathExpression(java.lang.String formula)
throws java.lang.ArithmeticException
java.lang.ArithmeticException
public static double parseMathExpression(java.lang.String formula,
double[] vars)
throws java.lang.ArithmeticException
java.lang.ArithmeticExceptionpublic static long s_long(java.lang.String LONG)
LONG - String to convert
public static float s_float(java.lang.String FLOAT)
FLOAT - String to convert
public static double s_double(java.lang.String DOUBLE)
DOUBLE - String to convert
public static int abs(int val)
public static long abs(long val)
public static boolean s_bool(java.lang.String BOOL)
BOOL - Boolean value of string
public static boolean isBool(java.lang.String BOOL)
BOOL - Boolean value of string
public static int s_int(java.lang.String INT)
INT - Integer value of string
public static short s_short(java.lang.String SHORT)
SHORT - Short value of string
public static boolean isLong(java.lang.String LONG)
LONG - Long value of string
public static boolean isInteger(java.lang.String INT)
INT - Integer value of string
public static boolean isFloat(java.lang.String DBL)
DBL - float value of string
public static boolean isDouble(java.lang.String DBL)
DBL - double value of string
public long round(double d)
public long round(float d)
public double abs(double d)
public float abs(float d)
public double random()
public double floor(double d)
public float floor(float d)
public double ceiling(double d)
public float ceiling(float d)
public double sqrt(double d)
public float sqrt(float d)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||