]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/formula/SqrtFormulaFunction.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / formula / SqrtFormulaFunction.java
index 860379479c9d5a7405da0e2cd761a7600c22f535..ae841568f5ddc926db73ef089e99a54395e7a686 100644 (file)
@@ -1,21 +1,21 @@
-package org.simantics.spreadsheet.graph.formula;\r
-\r
-import org.simantics.spreadsheet.graph.CellFormulaFunction;\r
-import org.simantics.spreadsheet.graph.CellValueVisitor;\r
-import org.simantics.spreadsheet.graph.SpreadsheetGraphUtils;\r
-import org.simantics.spreadsheet.graph.parser.ast.AstArgList;\r
-\r
-public class SqrtFormulaFunction implements CellFormulaFunction<Object> {\r
-\r
-    @Override\r
-    public Object evaluate(CellValueVisitor visitor, AstArgList args) {\r
-        if (args.values.size() != 1) throw new IllegalStateException();\r
-        \r
-        Object number = args.values.get(0).accept(visitor);\r
-        Double dVal = SpreadsheetGraphUtils.asDoubleWhereEmptyStringIsZero(number);\r
-        if(dVal==null) return FormulaError2.handleErrorCall(number);\r
-        if(dVal<0) return FormulaError2.NUM.getString();\r
-\r
-        return Math.sqrt(dVal);\r
-    }\r
-}\r
+package org.simantics.spreadsheet.graph.formula;
+
+import org.simantics.spreadsheet.graph.CellFormulaFunction;
+import org.simantics.spreadsheet.graph.CellValueVisitor;
+import org.simantics.spreadsheet.graph.SpreadsheetGraphUtils;
+import org.simantics.spreadsheet.graph.parser.ast.AstArgList;
+
+public class SqrtFormulaFunction implements CellFormulaFunction<Object> {
+
+    @Override
+    public Object evaluate(CellValueVisitor visitor, AstArgList args) {
+        if (args.values.size() != 1) throw new IllegalStateException();
+        
+        Object number = args.values.get(0).accept(visitor);
+        Double dVal = SpreadsheetGraphUtils.asDoubleWhereEmptyStringIsZero(number);
+        if(dVal==null) return FormulaError2.handleErrorCall(number);
+        if(dVal<0) return FormulaError2.NUM.getString();
+
+        return Math.sqrt(dVal);
+    }
+}