1 package edu.psu.geovista.app.spreadsheet.functions;
2
3 import edu.psu.geovista.app.spreadsheet.formula.Node;
4 import edu.psu.geovista.app.spreadsheet.exception.ParserException;
5 import edu.psu.geovista.app.spreadsheet.exception.NoReferenceException;
6
7 /*
8 * Description:
9 * Date: Apr 1, 2003
10 * Time: 9:44:38 PM
11 * @author Jin Chen
12 */
13
14 public class FunctionPI extends FunctionSP {
15
16 protected Number doFun(Node node)throws ParserException,NoReferenceException {
17 // no parameters allowed
18 if (node.getParams().size() != 0)
19 throw new ParserException("#PARAM?");
20 return new Float(Math.PI);
21 }
22
23 public String getUsage() {
24 return "PI()";
25 }
26
27 public String getDescription() {
28 return "Returns the value of PI.";
29 }
30 }
This page was automatically generated by Maven