public class MathFunctions extends Object
java.lang.Math
for the BASIC programs. If the
documentation of the method does not specify different then the method in
this class can be invoked directly from a BASIC program and does exactly the
same as the method of the same name in the class java.lang.Math
.
When a method accepts Number
arguments it means that the BASIC can
call the function with integer or with floating point arguments.
Modifier and Type | Method and Description |
---|---|
static Number |
abs(Number x) |
static double |
acos(double x) |
static double |
asin(double x) |
static double |
atan(double x) |
static double |
atan2(double x,
double y) |
static double |
cbrt(double x) |
static double |
ceil(double x) |
static double |
copySign(double magnitude,
double sign) |
static double |
cos(double x) |
static double |
cosh(double x) |
static double |
exp(double a) |
static double |
expm1(double x) |
static Double |
floatF(Object s)
Convert a value to floating point.
|
static double |
floor(double x) |
static Long |
getExponent(double d) |
static double |
hypot(double x,
double y) |
static double |
IEEEremainder(double f1,
double f2) |
static Long |
integer(Object s)
Convert a value to integer.
|
static double |
log(double x) |
static double |
log10(double x) |
static double |
log1p(double x) |
static Number |
max(Number a,
Number b) |
static Number |
min(Number a,
Number b) |
static double |
pow(double a,
double b) |
static double |
random() |
static double |
rint(double a) |
static double |
round(double x) |
static double |
scalb(double d,
int scaleFactor) |
static double |
signum(double d) |
static double |
sin(double x) |
static double |
sinh(double x) |
static double |
sqrt(double a) |
static double |
tan(double x) |
static double |
tanh(double x) |
static double |
toDegrees(double angrad) |
static double |
toRadians(double angdeg) |
public static Number abs(Number x) throws ExecutionException
ExecutionException
public static double acos(double x)
public static double asin(double x)
public static double atan(double x)
public static double atan2(double x, double y)
public static double cbrt(double x)
public static double ceil(double x)
public static double copySign(double magnitude, double sign)
public static double cos(double x)
public static double cosh(double x)
public static double exp(double a)
public static double expm1(double x)
public static Double floatF(Object s)
Use this function from the BASIC program if the BASIC interpreter does not convert automatically a number to floating point but you need a floating point number and not an integer.
s
- the number to convertnull
, which means undefined in
BASIC in case the parameter s
passed can not be converted
to floating pointpublic static Long integer(Object s)
Use this function from the BASIC program if the BASIC interpreter does not convert automatically a number to integer but you need an integer number and not a floating point number.
s
- the number to convertnull
, which means undefined in
BASIC in case the parameter s
passed can not be converted
to integerpublic static double floor(double x)
public static Long getExponent(double d)
public static double hypot(double x, double y)
public static double IEEEremainder(double f1, double f2)
public static double log(double x)
public static double log10(double x)
public static double log1p(double x)
public static double pow(double a, double b)
public static double random()
public static double rint(double a)
public static double round(double x)
public static double scalb(double d, int scaleFactor)
public static double signum(double d)
public static double sin(double x)
public static double sinh(double x)
public static double sqrt(double a)
public static double tan(double x)
public static double tanh(double x)
public static double toDegrees(double angrad)
public static double toRadians(double angdeg)
Copyright © 2013 Verhas and Verhas Software Craftsmen. All Rights Reserved.