File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
jcalc/src/main/java/cu/lt/joe/jcalc/algorithms Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ protected static boolean isMathConstant(char possibleConstant)
8383 return possibleConstant == 'e' || possibleConstant == 'π' ;
8484 }
8585
86- protected static boolean isFunctionalOperator (String possibleFunctionalOperator )
86+ protected static boolean isTrigonometricOperator (String possibleTrigonometricOperator )
8787 {
88- switch (possibleFunctionalOperator )
88+ switch (possibleTrigonometricOperator )
8989 {
9090 case "sin" :
9191 case "cos" :
@@ -99,14 +99,23 @@ protected static boolean isFunctionalOperator(String possibleFunctionalOperator)
9999 case "csc" :
100100 case "sec" :
101101 case "cot" :
102+ return true ;
103+ }
104+ return false ;
105+ }
106+
107+ protected static boolean isFunctionalOperator (String possibleFunctionalOperator )
108+ {
109+ switch (possibleFunctionalOperator )
110+ {
102111 case "ln" :
103112 case "log" :
104113 case "log2" :
105114 case "sqrt" :
106115 case "cbrt" :
107116 return true ;
108117 }
109- return false ;
118+ return isTrigonometricOperator ( possibleFunctionalOperator ) ;
110119 }
111120
112121 /**
You can’t perform that action at this time.
0 commit comments