Statistics
| Revision:

svn-gvsig-desktop / 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 / ASinFunction.java @ 43989

History | View | Annotate | Download (1.11 KB)

1
package org.gvsig.expressionevaluator.impl.function.numeric;
2

    
3
import org.apache.commons.lang3.Range;
4
import org.gvsig.expressionevaluator.Interpreter;
5
import org.gvsig.expressionevaluator.spi.AbstractFunction;
6

    
7
public class ASinFunction extends AbstractFunction {
8

    
9
    public ASinFunction() {
10
        super("Numeric", "ASIN", Range.is(1),
11
            "Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2. Special cases:\n" +
12
            "- If the argument is NaN or its absolute value is greater than 1, then the result is NaN.\n" +
13
            "- If the argument is zero, then the result is a zero with the same sign as the argument.\n" +
14
            "The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.",   
15
            "ASIN({{a}})",
16
            new String[]{
17
                "a - the value whose arc sine is to be returned"
18
            },
19
            "Double",
20
            true
21
        );
22
    }
23

    
24
    @Override
25
    public Object call(Interpreter interpreter, Object[] args) {
26
        double r = Math.asin(getDouble(args, 0));
27
        return r;
28
    }
29

    
30
}