|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.lib.ExsltBase org.apache.xalan.lib.ExsltMath
public class ExsltMath
This class contains EXSLT math extension functions. It is accessed by specifying a namespace URI as follows:
xmlns:math="http://exslt.org/math"The documentation for each function has been copied from the relevant EXSLT Implementer page.
Field Summary | |
---|---|
private static java.lang.String |
E
|
private static java.lang.String |
LN10
|
private static java.lang.String |
LN2
|
private static java.lang.String |
LOG2E
|
private static java.lang.String |
PI
|
private static java.lang.String |
SQRRT2
|
private static java.lang.String |
SQRT1_2
|
Constructor Summary | |
---|---|
ExsltMath()
|
Method Summary | |
---|---|
static double |
abs(double num)
The math:abs function returns the absolute value of a number. |
static double |
acos(double num)
The math:acos function returns the arccosine value of a number. |
static double |
asin(double num)
The math:asin function returns the arcsine value of a number. |
static double |
atan(double num)
The math:atan function returns the arctangent value of a number. |
static double |
atan2(double num1,
double num2)
The math:atan2 function returns the angle ( in radians ) from the X axis to a point (y,x). |
static double |
constant(java.lang.String name,
double precision)
The math:constant function returns the specified constant to a set precision. |
static double |
cos(double num)
The math:cos function returns cosine of the passed argument. |
static double |
exp(double num)
The math:exp function returns e (the base of natural logarithms) raised to a power. |
static org.w3c.dom.NodeList |
highest(org.w3c.dom.NodeList nl)
The math:highest function returns the nodes in the node set whose value is the maximum value for the node set. |
static double |
log(double num)
The math:log function returns the natural logarithm of a number. |
static org.w3c.dom.NodeList |
lowest(org.w3c.dom.NodeList nl)
The math:lowest function returns the nodes in the node set whose value is the minimum value for the node set. |
static double |
max(org.w3c.dom.NodeList nl)
The math:max function returns the maximum value of the nodes passed as the argument. |
static double |
min(org.w3c.dom.NodeList nl)
The math:min function returns the minimum value of the nodes passed as the argument. |
static double |
power(double num1,
double num2)
The math:power function returns the value of a base expression taken to a specified power. |
static double |
random()
The math:random function returns a random number from 0 to 1. |
static double |
sin(double num)
The math:sin function returns the sine of the number. |
static double |
sqrt(double num)
The math:sqrt function returns the square root of a number. |
static double |
tan(double num)
The math:tan function returns the tangent of the number passed as an argument. |
Methods inherited from class org.apache.xalan.lib.ExsltBase |
---|
toNumber, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.String PI
private static java.lang.String E
private static java.lang.String SQRRT2
private static java.lang.String LN2
private static java.lang.String LN10
private static java.lang.String LOG2E
private static java.lang.String SQRT1_2
Constructor Detail |
---|
public ExsltMath()
Method Detail |
---|
public static double max(org.w3c.dom.NodeList nl)
If the node set is empty, or if the result of converting the string values of any of the nodes to a number is NaN, then NaN is returned.
nl
- The NodeList for the node-set to be evaluated.
public static double min(org.w3c.dom.NodeList nl)
If the node set is empty, or if the result of converting the string values of any of the nodes to a number is NaN, then NaN is returned.
nl
- The NodeList for the node-set to be evaluated.
public static org.w3c.dom.NodeList highest(org.w3c.dom.NodeList nl)
If any of the nodes in the node set has a non-numeric value, the math:max function will return NaN. The definition numeric comparisons entails that NaN != NaN. Therefore if any of the nodes in the node set has a non-numeric value, math:highest will return an empty node set.
nl
- The NodeList for the node-set to be evaluated.
public static org.w3c.dom.NodeList lowest(org.w3c.dom.NodeList nl)
If any of the nodes in the node set has a non-numeric value, the math:min function will return NaN. The definition numeric comparisons entails that NaN != NaN. Therefore if any of the nodes in the node set has a non-numeric value, math:lowest will return an empty node set.
nl
- The NodeList for the node-set to be evaluated.
public static double abs(double num)
num
- A number
public static double acos(double num)
num
- A number
public static double asin(double num)
num
- A number
public static double atan(double num)
num
- A number
public static double atan2(double num1, double num2)
num1
- The X axis valuenum2
- The Y axis value
public static double cos(double num)
num
- A number
public static double exp(double num)
num
- A number
public static double log(double num)
num
- A number
public static double power(double num1, double num2)
num1
- The basenum2
- The power
public static double random()
public static double sin(double num)
num
- A number
public static double sqrt(double num)
num
- A number
public static double tan(double num)
num
- A number
public static double constant(java.lang.String name, double precision)
PI E SQRRT2 LN2 LN10 LOG2E SQRT1_2
name
- The name of the constantprecision
- The precision
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |