summaryrefslogtreecommitdiff
path: root/src/function/Sin.java
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2022-04-25 18:36:30 +0200
committerLeonard Kugis <leonard@kug.is>2022-04-25 18:36:30 +0200
commit84e220b332bfffb0f2dcc39b9697a6fd6691d265 (patch)
tree0b861a9a099017ffd9bf00bae12e33ed6a309bbe /src/function/Sin.java
Initial commitHEADmaster
Diffstat (limited to 'src/function/Sin.java')
-rwxr-xr-xsrc/function/Sin.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/function/Sin.java b/src/function/Sin.java
new file mode 100755
index 0000000..83bbb6b
--- /dev/null
+++ b/src/function/Sin.java
@@ -0,0 +1,19 @@
+package function;
+
+public class Sin extends Function {
+
+ private double a, b, c, d;
+
+ public Sin(double a, double b, double c, double d) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ this.d = d;
+ }
+
+ @Override
+ public double getY(double x) {
+ return a*Math.sin(b*(x+c))+d;
+ }
+
+}