File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,11 @@ private Double calculateBiImpl() {
2222 return num2 ;
2323 }
2424 if (mode == BiOperatorModes .add ) {
25- if (num2 != 0 ) {
25+ if (num2 != 0 ) {
2626 return num1 + num2 ;
2727 }
28- else {
29- return num1 ;
30- }
28+
29+ return num1 ;
3130 }
3231 if (mode == BiOperatorModes .minus ) {
3332 return num1 - num2 ;
@@ -89,24 +88,24 @@ public Double calculateMono(MonoOperatorModes newMode, Double num) {
8988 return Math .sin (num );
9089 }
9190 if (newMode == MonoOperatorModes .tan ) {
92- if (num == 0 || num % 180 == 0 )
91+ if (num == 0 || num % 180 == 0 ) {
9392 return 0.0 ;
94- else if (num %90 ==0 && num %180 !=0 )
93+ }
94+ if (num % 90 == 0 && num % 180 != 0 )
9595 return NaN ;
96- else
97- return Math .tan (num );
96+ }
97+
98+ return Math .tan (num );
9899 }
99100 if (newMode == MonoOperatorModes .log ) {
100101 return log10 (num );
101102 }
102103 if (newMode == MonoOperatorModes .rate ) {
103104 return num / 100 ;
104105 }
105- if (newMode == MonoOperatorModes .abs ){
106+ if (newMode == MonoOperatorModes .abs ){
106107 return Math .abs (num );
107108 }
108-
109-
110109
111110 // never reach
112111 throw new Error ();
You can’t perform that action at this time.
0 commit comments