Revision 43983 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/function/numeric/AbsFunction.java
AbsFunction.java | ||
---|---|---|
7 | 7 |
public class AbsFunction extends AbstractFunction { |
8 | 8 |
|
9 | 9 |
public AbsFunction() { |
10 |
super("Numeric", "ABS",Range.is(1)); |
|
10 |
super("Numeric", "ABS",Range.is(1), |
|
11 |
"Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:\n" + |
|
12 |
"- If the argument is positive zero or negative zero, the result is positive zero.\n" + |
|
13 |
"- If the argument is infinite, the result is positive infinity.\n" + |
|
14 |
"- If the argument is NaN, the result is NaN.\n" + |
|
15 |
"In other words, the result is the same as the value of the expression:\n" + |
|
16 |
"Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)", |
|
17 |
"ABS({{a}})", |
|
18 |
new String[]{ |
|
19 |
"a - the argument whose absolute value is to be determined" |
|
20 |
}, |
|
21 |
"Double" |
|
22 |
); |
|
11 | 23 |
} |
12 | 24 |
|
13 | 25 |
@Override |
Also available in: Unified diff