#32 Calcskin work in progress

Отворено
Skamath321 жели да споји 1 комит(е) из Skamath321/CalcSkin:master у master

+ 2
- 2
pom.xml Прегледај датотеку

13
                 <groupId>org.apache.maven.plugins</groupId>
13
                 <groupId>org.apache.maven.plugins</groupId>
14
                 <artifactId>maven-compiler-plugin</artifactId>
14
                 <artifactId>maven-compiler-plugin</artifactId>
15
                 <configuration>
15
                 <configuration>
16
-                    <source>1.7</source>
17
-                    <target>1.7</target>
16
+                    <source>8</source>
17
+                    <target>8</target>
18
                 </configuration>
18
                 </configuration>
19
             </plugin>
19
             </plugin>
20
         </plugins>
20
         </plugins>

+ 49
- 4
src/main/java/rocks/zipcode/calcskin/CalcEngine.java Прегледај датотеку

6
     }
6
     }
7
 
7
 
8
     public double add(double v, double v1) {
8
     public double add(double v, double v1) {
9
-        return Double.NaN;
9
+        return v+v1;
10
     }
10
     }
11
 
11
 
12
     public double subtract(double v, double v1) {
12
     public double subtract(double v, double v1) {
13
-        return Double.NaN;
13
+        return v-v1;
14
     }
14
     }
15
 
15
 
16
     public double multiply(double v, double v1) {
16
     public double multiply(double v, double v1) {
17
-        return Double.NaN;
17
+        return v*v1;
18
     }
18
     }
19
 
19
 
20
     public double divide(double v, double v1) {
20
     public double divide(double v, double v1) {
21
-        return Double.NaN;
21
+        return v/v1;
22
     }
22
     }
23
+    public double square(double v)
24
+    {
25
+        return Math.pow(v, 2.0);
26
+    }
27
+
28
+    public double root(double v) {
29
+        return Math.sqrt(v);
30
+    }
31
+
32
+    public double inverse(double v){
33
+        return 1.0 / v;
34
+    }
35
+
36
+    public double expo(double v, double v1) {
37
+        return Math.pow(v, v1);
38
+    }
39
+
40
+    public double tan(double v) {
41
+        return Math.tan(v);
42
+    }
43
+
44
+    public double log(double v) {
45
+        return Math.log10(v);
46
+    }
47
+
48
+    public double sin(double v) {
49
+        return Math.sin(v);
50
+    }
51
+
52
+    public double cos(double v) {
53
+        return Math.cos(v);
54
+    }
55
+
56
+    public double atan(double v) {
57
+        return Math.atan(v);
58
+    }
59
+
60
+    public double asin(double v) {
61
+        return Math.asin(v);
62
+    }
63
+
64
+    public double acos(double v) {
65
+        return Math.acos(v);
66
+    }
67
+
23
 }
68
 }

+ 8
- 6
src/main/java/rocks/zipcode/calcskin/CalcSkin.java Прегледај датотеку

2
 
2
 
3
 import javafx.application.Application;
3
 import javafx.application.Application;
4
 import javafx.beans.binding.Bindings;
4
 import javafx.beans.binding.Bindings;
5
-import javafx.beans.property.*;
5
+import javafx.beans.property.DoubleProperty;
6
+import javafx.beans.property.ObjectProperty;
7
+import javafx.beans.property.SimpleDoubleProperty;
8
+import javafx.beans.property.SimpleObjectProperty;
6
 import javafx.event.ActionEvent;
9
 import javafx.event.ActionEvent;
7
 import javafx.event.EventHandler;
10
 import javafx.event.EventHandler;
8
 import javafx.geometry.Pos;
11
 import javafx.geometry.Pos;
9
 import javafx.scene.Scene;
12
 import javafx.scene.Scene;
10
-import javafx.scene.control.*;
13
+import javafx.scene.control.Button;
14
+import javafx.scene.control.TextField;
11
 import javafx.scene.input.KeyEvent;
15
 import javafx.scene.input.KeyEvent;
12
-import javafx.scene.layout.*;
16
+import javafx.scene.layout.TilePane;
17
+import javafx.scene.layout.VBox;
13
 import javafx.stage.Stage;
18
 import javafx.stage.Stage;
14
 import javafx.stage.StageStyle;
19
 import javafx.stage.StageStyle;
15
-import rocks.zipcode.calcskin.CalcEngine;
16
 
20
 
17
 import java.util.HashMap;
21
 import java.util.HashMap;
18
 import java.util.Map;
22
 import java.util.Map;
190
         });
194
         });
191
     }
195
     }
192
 }
196
 }
193
-
194
-