]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/formula/PiFormulaFunction.java
Improved exception message
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / formula / PiFormulaFunction.java
1 package org.simantics.spreadsheet.graph.formula;
2
3 import org.simantics.spreadsheet.graph.CellFormulaFunction;
4 import org.simantics.spreadsheet.graph.CellValueVisitor;
5 import org.simantics.spreadsheet.graph.parser.ast.AstArgList;
6
7 public class PiFormulaFunction implements CellFormulaFunction<Double> {
8
9     @Override
10     public Double evaluate(CellValueVisitor visitor, AstArgList args) {
11         if (args != null)
12             throw new IllegalStateException();
13         return Math.PI;
14     }
15 }